mirror of
https://github.com/penpot/penpot.git
synced 2025-05-20 03:26:11 +02:00
♻️ Rename bindings
This commit is contained in:
parent
6fed0f3b58
commit
a33828467f
1 changed files with 4 additions and 3 deletions
|
@ -859,10 +859,11 @@
|
||||||
(rx/of (reorder-selected-layout-child direction))
|
(rx/of (reorder-selected-layout-child direction))
|
||||||
(rx/of (nudge-selected-shapes direction shift?)))))))
|
(rx/of (nudge-selected-shapes direction shift?)))))))
|
||||||
|
|
||||||
(defn- get-relative-delta [position bbox parent]
|
(defn- get-relative-delta [position bbox frame]
|
||||||
(let [parent-bbox (-> parent :points grc/points->rect)
|
(let [frame-bbox (-> frame :points grc/points->rect)
|
||||||
relative-cpos (gpt/subtract (gpt/point (:x bbox) (:y bbox))
|
relative-cpos (gpt/subtract (gpt/point (:x bbox) (:y bbox))
|
||||||
(gpt/point (:x parent-bbox) (:y parent-bbox)))
|
(gpt/point (:x frame-bbox)
|
||||||
|
(:y frame-bbox)))
|
||||||
cpos (gpt/point (:x relative-cpos) (:y relative-cpos))
|
cpos (gpt/point (:x relative-cpos) (:y relative-cpos))
|
||||||
pos (gpt/point (or (:x position) (:x relative-cpos))
|
pos (gpt/point (or (:x position) (:x relative-cpos))
|
||||||
(or (:y position) (:y relative-cpos)))]
|
(or (:y position) (:y relative-cpos)))]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue