mirror of
https://github.com/penpot/penpot.git
synced 2025-05-19 01:56:09 +02:00
🐛 Fix problem with create board on cells
This commit is contained in:
parent
c7ed642f6a
commit
5c3ea37bbe
2 changed files with 7 additions and 3 deletions
|
@ -341,11 +341,17 @@
|
|||
|
||||
handle-context-menu
|
||||
(mf/use-callback
|
||||
(mf/deps (:id shape) (:id cell) selected?)
|
||||
(fn [event]
|
||||
(dom/prevent-default event)
|
||||
(dom/stop-propagation event)
|
||||
(let [position (dom/get-client-position event)]
|
||||
(st/emit! (dw/show-grid-cell-context-menu {:position position :grid-id (:id shape)})))))]
|
||||
(if selected?
|
||||
(st/emit! (dw/show-grid-cell-context-menu {:position position :grid-id (:id shape)}))
|
||||
|
||||
;; If right-click on a non-selected cell we select the cell and then open the menu
|
||||
(st/emit! (dwge/set-selection (:id shape) (:id cell))
|
||||
(dw/show-grid-cell-context-menu {:position position :grid-id (:id shape)}))))))]
|
||||
|
||||
[:g.cell-editor
|
||||
;; DEBUG OVERLAY
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue