mirror of
https://github.com/penpot/penpot.git
synced 2025-01-08 16:00:19 -05:00
🐛 Fix drag and drop graphic assets in groups
This commit is contained in:
parent
02efffceb4
commit
aa4344a76f
2 changed files with 15 additions and 1 deletions
|
@ -56,6 +56,7 @@
|
||||||
- Fix unexpected layers ungrouping on moving it [Taiga #3932](https://tree.taiga.io/project/penpot/issue/3932) by @andrewzhurov
|
- Fix unexpected layers ungrouping on moving it [Taiga #3932](https://tree.taiga.io/project/penpot/issue/3932) by @andrewzhurov
|
||||||
- Fix unexpected exception and behavior on colorpicker with gradients [Taiga #3448](https://tree.taiga.io/project/penpot/issue/3448)
|
- Fix unexpected exception and behavior on colorpicker with gradients [Taiga #3448](https://tree.taiga.io/project/penpot/issue/3448)
|
||||||
- Fix multiselection with shift not working inside a library group [Taiga #3532](https://tree.taiga.io/project/penpot/issue/3532)
|
- Fix multiselection with shift not working inside a library group [Taiga #3532](https://tree.taiga.io/project/penpot/issue/3532)
|
||||||
|
- Fix drag and drop graphic assets in groups [Taiga #4002](https://tree.taiga.io/project/penpot/issue/4002)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -892,6 +892,17 @@
|
||||||
(seq (:colors selected-assets))
|
(seq (:colors selected-assets))
|
||||||
(seq (:typographies selected-assets)))
|
(seq (:typographies selected-assets)))
|
||||||
|
|
||||||
|
extract-path-if-missing
|
||||||
|
(fn [graphic]
|
||||||
|
(let [[path name] (cph/parse-path-name (:name graphic))]
|
||||||
|
(if (and
|
||||||
|
(= (:name graphic) name)
|
||||||
|
(contains? graphic :path))
|
||||||
|
graphic
|
||||||
|
(assoc graphic :path path :name name))))
|
||||||
|
|
||||||
|
objects (->> objects
|
||||||
|
(map extract-path-if-missing))
|
||||||
|
|
||||||
|
|
||||||
groups (group-assets objects reverse-sort?)
|
groups (group-assets objects reverse-sort?)
|
||||||
|
@ -1626,7 +1637,9 @@
|
||||||
extract-path-if-missing
|
extract-path-if-missing
|
||||||
(fn [typography]
|
(fn [typography]
|
||||||
(let [[path name] (cph/parse-path-name (:name typography))]
|
(let [[path name] (cph/parse-path-name (:name typography))]
|
||||||
(if (= (:name typography) name)
|
(if (and
|
||||||
|
(= (:name typography) name)
|
||||||
|
(contains? typography :path))
|
||||||
typography
|
typography
|
||||||
(assoc typography :path path :name name))))
|
(assoc typography :path path :name name))))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue