🎉 Add right-click context menu on workspace.

This commit is contained in:
Andrey Antukh 2020-03-19 17:40:29 +01:00 committed by Alonso Torres
parent 1434cb62f5
commit cae5b5e778
9 changed files with 197 additions and 54 deletions

View file

@ -23,8 +23,10 @@
(mf/defrc rect-wrapper
[props]
(let [shape (unchecked-get props "shape")
on-mouse-down #(common/on-mouse-down % shape)]
[:g.shape {:on-mouse-down on-mouse-down}
on-mouse-down #(common/on-mouse-down % shape)
on-context-menu #(common/on-context-menu % shape)]
[:g.shape {:on-mouse-down on-mouse-down
:on-context-menu on-context-menu}
[:& rect-shape {:shape shape}]]))
;; --- Rect Shape