mirror of
https://github.com/penpot/penpot.git
synced 2025-02-10 00:58:26 -05:00
🐛 Fix problem duplicating paths
This commit is contained in:
parent
734287b66d
commit
e0e68835ef
2 changed files with 8 additions and 7 deletions
|
@ -25,6 +25,7 @@
|
|||
- Fix export group with shadows on children [Taiga #2036](https://tree.taiga.io/project/penpot/issue/2036)
|
||||
- Fix zoom context menu in viewer [Taiga #2041](https://tree.taiga.io/project/penpot/issue/2041)
|
||||
- Fix stroke caps adjustments in relation with stroke size [Taiga #2123](https://tree.taiga.io/project/penpot/issue/2123)
|
||||
- Fix problem duplicating paths [Taiga #2147](https://tree.taiga.io/project/penpot/issue/2147)
|
||||
|
||||
### :arrow_up: Deps updates
|
||||
### :boom: Breaking changes
|
||||
|
|
|
@ -420,13 +420,13 @@
|
|||
(gpt/point (+ (:width obj) 50) 0)
|
||||
(gpt/point 0 0))
|
||||
|
||||
(let [obj-original (get objects id-original)
|
||||
obj-duplicated (get objects id-duplicated)
|
||||
distance (gpt/subtract (gpt/point obj-duplicated)
|
||||
(gpt/point obj-original))
|
||||
new-pos (gpt/add (gpt/point obj-duplicated) distance)
|
||||
delta (gpt/subtract new-pos (gpt/point obj))]
|
||||
delta))))
|
||||
(let [pt-original (-> (get objects id-original) :selrect gpt/point)
|
||||
pt-duplicated (-> (get objects id-duplicated) :selrect gpt/point)
|
||||
pt-obj (-> obj :selrect gpt/point)
|
||||
distance (gpt/subtract pt-duplicated pt-original)
|
||||
new-pos (gpt/add pt-duplicated distance)]
|
||||
|
||||
(gpt/subtract new-pos pt-obj)))))
|
||||
|
||||
(defn duplicate-selected [move-delta?]
|
||||
(ptk/reify ::duplicate-selected
|
||||
|
|
Loading…
Add table
Reference in a new issue