mirror of
https://github.com/penpot/penpot.git
synced 2025-05-12 14:56:38 +02:00
🐛 Fix problem with SVG import
This commit is contained in:
parent
488d034a58
commit
a180c33a32
2 changed files with 9 additions and 2 deletions
|
@ -76,6 +76,7 @@
|
||||||
- Fix fill collapsed options [Taiga #8351](https://tree.taiga.io/project/penpot/issue/8351)
|
- Fix fill collapsed options [Taiga #8351](https://tree.taiga.io/project/penpot/issue/8351)
|
||||||
- Fix scroll on color picker modal [Taiga #8353](https://tree.taiga.io/project/penpot/issue/8353)
|
- Fix scroll on color picker modal [Taiga #8353](https://tree.taiga.io/project/penpot/issue/8353)
|
||||||
- Fix components are not dragged from the group to the assets tab [Taiga #8273](https://tree.taiga.io/project/penpot/issue/8273)
|
- Fix components are not dragged from the group to the assets tab [Taiga #8273](https://tree.taiga.io/project/penpot/issue/8273)
|
||||||
|
- Fix problem with SVG import [Github #4888](https://github.com/penpot/penpot/issues/4888)
|
||||||
|
|
||||||
## 2.1.5
|
## 2.1.5
|
||||||
|
|
||||||
|
|
|
@ -73,7 +73,6 @@
|
||||||
(let [id (d/nilv id (uuid/next))
|
(let [id (d/nilv id (uuid/next))
|
||||||
page-id (:current-page-id state)
|
page-id (:current-page-id state)
|
||||||
objects (wsh/lookup-page-objects state page-id)
|
objects (wsh/lookup-page-objects state page-id)
|
||||||
frame-id (ctst/top-nested-frame objects position)
|
|
||||||
selected (if ignore-selection? #{} (wsh/lookup-selected state))
|
selected (if ignore-selection? #{} (wsh/lookup-selected state))
|
||||||
base (cfh/get-base-shape objects selected)
|
base (cfh/get-base-shape objects selected)
|
||||||
|
|
||||||
|
@ -81,9 +80,16 @@
|
||||||
selected-frame? (and (= 1 (count selected))
|
selected-frame? (and (= 1 (count selected))
|
||||||
(= :frame (dm/get-in objects [selected-id :type])))
|
(= :frame (dm/get-in objects [selected-id :type])))
|
||||||
|
|
||||||
|
base-id (:parent-id base)
|
||||||
|
|
||||||
|
frame-id (if (or selected-frame? (empty? selected)
|
||||||
|
(not= :frame (dm/get-in objects [base-id :type])))
|
||||||
|
(ctst/top-nested-frame objects position)
|
||||||
|
base-id)
|
||||||
|
|
||||||
parent-id (if (or selected-frame? (empty? selected))
|
parent-id (if (or selected-frame? (empty? selected))
|
||||||
frame-id
|
frame-id
|
||||||
(:parent-id base))
|
base-id)
|
||||||
|
|
||||||
[new-shape new-children]
|
[new-shape new-children]
|
||||||
(csvg.shapes-builder/create-svg-shapes id svg-data position objects frame-id parent-id selected true)
|
(csvg.shapes-builder/create-svg-shapes id svg-data position objects frame-id parent-id selected true)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue