mirror of
https://github.com/penpot/penpot.git
synced 2025-02-03 21:09:00 -05:00
🐛 Fixes problems with options panel
This commit is contained in:
parent
de476383bd
commit
6d1a676f2f
3 changed files with 13 additions and 9 deletions
|
@ -1414,14 +1414,15 @@
|
||||||
(us/verify ::us/uuid id)
|
(us/verify ::us/uuid id)
|
||||||
(us/verify ::position position)
|
(us/verify ::position position)
|
||||||
(ptk/reify ::update-position
|
(ptk/reify ::update-position
|
||||||
IUpdateGroup
|
ptk/WatchEvent
|
||||||
(get-ids [_] [id])
|
(watch [_ state stream]
|
||||||
|
(let [page-id (:current-page-id state)
|
||||||
ptk/UpdateEvent
|
shape (get-in state [:workspace-data page-id :objects id])
|
||||||
(update [_ state]
|
current-position (gpt/point (:x shape) (:y shape))
|
||||||
(let [page-id (:current-page-id state)]
|
position (gpt/point (or (:x position) (:x shape)) (or (:y position) (:y shape)))
|
||||||
(update-in state [:workspace-data page-id :objects id]
|
displacement (gmt/translate-matrix (gpt/subtract position current-position))]
|
||||||
geom/absolute-move position)))))
|
(rx/of (transforms/set-modifiers [id] {:displacement displacement})
|
||||||
|
(transforms/apply-modifiers [id]))))))
|
||||||
|
|
||||||
;; --- Path Modifications
|
;; --- Path Modifications
|
||||||
|
|
||||||
|
@ -1744,6 +1745,7 @@
|
||||||
(def start-move-selected transforms/start-move-selected)
|
(def start-move-selected transforms/start-move-selected)
|
||||||
(def move-selected transforms/move-selected)
|
(def move-selected transforms/move-selected)
|
||||||
|
|
||||||
|
(def set-rotation transforms/set-rotation)
|
||||||
(def set-modifiers transforms/set-modifiers)
|
(def set-modifiers transforms/set-modifiers)
|
||||||
(def apply-modifiers transforms/apply-modifiers)
|
(def apply-modifiers transforms/apply-modifiers)
|
||||||
|
|
||||||
|
|
|
@ -313,3 +313,4 @@
|
||||||
(let [page-id (:current-page-id state)]
|
(let [page-id (:current-page-id state)]
|
||||||
(rx/of (common/diff-and-commit-changes page-id)
|
(rx/of (common/diff-and-commit-changes page-id)
|
||||||
(common/rehash-shape-frame-relationship ids))))))
|
(common/rehash-shape-frame-relationship ids))))))
|
||||||
|
|
||||||
|
|
|
@ -67,7 +67,8 @@
|
||||||
(let [value (-> (dom/get-target event)
|
(let [value (-> (dom/get-target event)
|
||||||
(dom/get-value)
|
(dom/get-value)
|
||||||
(d/parse-integer 0))]
|
(d/parse-integer 0))]
|
||||||
(st/emit! (udw/update-shape (:id shape) {:rotation value}))))
|
(st/emit! (udw/set-rotation (- value (:rotation shape)) [shape])
|
||||||
|
(udw/apply-modifiers #{(:id shape)}))))
|
||||||
|
|
||||||
on-radius-change
|
on-radius-change
|
||||||
(fn [event]
|
(fn [event]
|
||||||
|
|
Loading…
Add table
Reference in a new issue