mirror of
https://github.com/penpot/penpot.git
synced 2025-07-25 12:17:32 +02: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 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 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 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
|
### :arrow_up: Deps updates
|
||||||
### :boom: Breaking changes
|
### :boom: Breaking changes
|
||||||
|
|
|
@ -420,13 +420,13 @@
|
||||||
(gpt/point (+ (:width obj) 50) 0)
|
(gpt/point (+ (:width obj) 50) 0)
|
||||||
(gpt/point 0 0))
|
(gpt/point 0 0))
|
||||||
|
|
||||||
(let [obj-original (get objects id-original)
|
(let [pt-original (-> (get objects id-original) :selrect gpt/point)
|
||||||
obj-duplicated (get objects id-duplicated)
|
pt-duplicated (-> (get objects id-duplicated) :selrect gpt/point)
|
||||||
distance (gpt/subtract (gpt/point obj-duplicated)
|
pt-obj (-> obj :selrect gpt/point)
|
||||||
(gpt/point obj-original))
|
distance (gpt/subtract pt-duplicated pt-original)
|
||||||
new-pos (gpt/add (gpt/point obj-duplicated) distance)
|
new-pos (gpt/add pt-duplicated distance)]
|
||||||
delta (gpt/subtract new-pos (gpt/point obj))]
|
|
||||||
delta))))
|
(gpt/subtract new-pos pt-obj)))))
|
||||||
|
|
||||||
(defn duplicate-selected [move-delta?]
|
(defn duplicate-selected [move-delta?]
|
||||||
(ptk/reify ::duplicate-selected
|
(ptk/reify ::duplicate-selected
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue