mirror of
https://github.com/penpot/penpot.git
synced 2025-01-25 07:58:49 -05: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
|
@ -1111,7 +1111,6 @@
|
|||
|
||||
(defn assign-cell-positions
|
||||
[parent objects]
|
||||
(prn ">>>>assign-cell-positions" (:name parent))
|
||||
(-> parent
|
||||
(check-deassigned-cells objects)
|
||||
(reassign-positions)
|
||||
|
@ -1128,7 +1127,6 @@
|
|||
;; - (maybe) create group/frames. This case will assigna a cell that had one of its children
|
||||
(defn assign-cells
|
||||
[parent objects]
|
||||
(prn ">assign-cells")
|
||||
(let [parent (assign-cell-positions parent objects)
|
||||
|
||||
shape-has-cell?
|
||||
|
|
|
@ -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
Reference in a new issue