mirror of
https://github.com/penpot/penpot.git
synced 2025-02-02 04:19:08 -05:00
🐛 Fix problem when selection shape while grid editing
This commit is contained in:
parent
f3cd384e8e
commit
10324b13ca
3 changed files with 13 additions and 10 deletions
|
@ -261,15 +261,17 @@
|
|||
(make-rect minx miny (- maxx minx) (- maxy miny))))))
|
||||
|
||||
(defn center->rect
|
||||
[point w h]
|
||||
(when (some? point)
|
||||
(let [x (dm/get-prop point :x)
|
||||
y (dm/get-prop point :y)]
|
||||
(when (d/num? x y w h)
|
||||
(make-rect (- x (/ w 2))
|
||||
(- y (/ h 2))
|
||||
w
|
||||
h)))))
|
||||
([point size]
|
||||
(center->rect point size size))
|
||||
([point w h]
|
||||
(when (some? point)
|
||||
(let [x (dm/get-prop point :x)
|
||||
y (dm/get-prop point :y)]
|
||||
(when (d/num? x y w h)
|
||||
(make-rect (- x (/ w 2))
|
||||
(- y (/ h 2))
|
||||
w
|
||||
h))))))
|
||||
|
||||
(defn s=
|
||||
[a b]
|
||||
|
|
|
@ -141,6 +141,7 @@
|
|||
objects (wsh/lookup-page-objects state page-id)]
|
||||
(rx/of
|
||||
(dwc/expand-all-parents [id] objects)
|
||||
:interrupt
|
||||
::dwsp/interrupt))))))
|
||||
|
||||
(defn select-prev-shape
|
||||
|
|
|
@ -115,7 +115,7 @@
|
|||
[:& bool-options]
|
||||
|
||||
(cond
|
||||
(d/not-empty? selected-cells)
|
||||
(and edit-grid? (d/not-empty? selected-cells))
|
||||
[:& grid-cell/options
|
||||
{:shape (get objects edition)
|
||||
:cells selected-cells}]
|
||||
|
|
Loading…
Add table
Reference in a new issue