mirror of
https://github.com/penpot/penpot.git
synced 2025-08-06 07:58:28 +02:00
🐛 Fix set X position from dimensions token (#5685)
This commit is contained in:
parent
b94afe143f
commit
0cf4d4636a
2 changed files with 21 additions and 20 deletions
|
@ -787,7 +787,8 @@
|
|||
|
||||
(defn update-position
|
||||
"Move shapes to a new position"
|
||||
[id position]
|
||||
([id position] (update-position id position nil))
|
||||
([id position opts]
|
||||
(dm/assert! (uuid? id))
|
||||
|
||||
(ptk/reify ::update-position
|
||||
|
@ -796,7 +797,6 @@
|
|||
(let [page-id (:current-page-id state)
|
||||
objects (dsh/lookup-page-objects state page-id)
|
||||
shape (get objects id)
|
||||
|
||||
;; FIXME: performance rect
|
||||
bbox (-> shape :points grc/points->rect)
|
||||
|
||||
|
@ -810,7 +810,8 @@
|
|||
|
||||
(rx/of (dwm/apply-modifiers {:modifiers modif-tree
|
||||
:ignore-constraints false
|
||||
:ignore-snap-pixel true}))))))
|
||||
:ignore-touched (:ignore-touched opts)
|
||||
:ignore-snap-pixel true})))))))
|
||||
|
||||
(defn position-shapes
|
||||
[shapes]
|
||||
|
|
|
@ -206,7 +206,7 @@
|
|||
ptk/WatchEvent
|
||||
(watch [_ _ _]
|
||||
(rx/concat
|
||||
(map #(dwt/update-position % (zipmap attributes (repeat value))) shape-ids)))))
|
||||
(map #(dwt/update-position % (zipmap attributes (repeat value)) {:ignore-touched true}) shape-ids)))))
|
||||
|
||||
(defn update-layout-sizing-limits [value shape-ids attributes]
|
||||
(ptk/reify ::update-layout-sizing-limits
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue