mirror of
https://github.com/penpot/penpot.git
synced 2025-01-09 08:20:45 -05:00
🐛 Fix problem when creating SVG images
This commit is contained in:
parent
d1dd13fde9
commit
aded9f1a36
2 changed files with 5 additions and 3 deletions
|
@ -467,4 +467,5 @@
|
|||
(watch [_ _ _]
|
||||
(->> (svg->clj [name svg-string])
|
||||
(rx/take 1)
|
||||
(rx/map #(svg/add-svg-shapes id % position {:change-selection? false}))))))
|
||||
(rx/map #(svg/add-svg-shapes id % position {:ignore-selection? true
|
||||
:change-selection? false}))))))
|
||||
|
|
|
@ -64,7 +64,8 @@
|
|||
([svg-data position]
|
||||
(add-svg-shapes nil svg-data position nil))
|
||||
|
||||
([id svg-data position {:keys [change-selection?] :or {change-selection? false}}]
|
||||
([id svg-data position {:keys [change-selection? ignore-selection?]
|
||||
:or {ignore-selection? false change-selection? true}}]
|
||||
(ptk/reify ::add-svg-shapes
|
||||
ptk/WatchEvent
|
||||
(watch [it state _]
|
||||
|
@ -73,7 +74,7 @@
|
|||
page-id (:current-page-id state)
|
||||
objects (wsh/lookup-page-objects state page-id)
|
||||
frame-id (ctst/top-nested-frame objects position)
|
||||
selected (wsh/lookup-selected state)
|
||||
selected (if ignore-selection? #{} (wsh/lookup-selected state))
|
||||
base (cfh/get-base-shape objects selected)
|
||||
|
||||
selected-id (first selected)
|
||||
|
|
Loading…
Reference in a new issue