0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-24 07:29:08 -05:00

Merge pull request #2621 from penpot/superalex-fix-develop

🐛 Fix develop branch
This commit is contained in:
Alejandro 2022-12-01 11:48:34 +01:00 committed by GitHub
commit 1b8e4dfdfa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 5 deletions

View file

@ -1609,11 +1609,12 @@
:width width :width width
:height height :height height
:grow-type (if (> (count text) 100) :auto-height :auto-width) :grow-type (if (> (count text) 100) :auto-height :auto-width)
:content (as-content text)}] :content (as-content text)}
undo-id (uuid/next)]
(rx/of (dwu/start-undo-transaction) (rx/of (dwu/start-undo-transaction undo-id)
(dwsh/create-and-add-shape :text x y shape) (dwsh/create-and-add-shape :text x y shape)
(dwu/commit-undo-transaction)))))) (dwu/commit-undo-transaction undo-id))))))
;; TODO: why not implement it in terms of upload-media-workspace? ;; TODO: why not implement it in terms of upload-media-workspace?
(defn- paste-svg (defn- paste-svg

View file

@ -249,7 +249,7 @@
process-svg process-svg
(fn [svg-data] (fn [svg-data]
(let [[shape children] (let [[shape children]
(svg/create-svg-shapes svg-data pos objects uuid/zero #{} false)] (svg/create-svg-shapes svg-data pos objects uuid/zero nil #{} false)]
[shape children]))] [shape children]))]
(->> (upload-images svg-data) (->> (upload-images svg-data)

View file

@ -559,7 +559,7 @@
page-selected (wsh/lookup-selected state) page-selected (wsh/lookup-selected state)
base (cph/get-base-shape page-objects page-selected) base (cph/get-base-shape page-objects page-selected)
parent-id (:parent-id base) parent-id (:parent-id base)
[new-shape new-children] [new-shape new-children]
(create-svg-shapes svg-data position objects frame-id parent-id selected true) (create-svg-shapes svg-data position objects frame-id parent-id selected true)
changes (-> (pcb/empty-changes it page-id) changes (-> (pcb/empty-changes it page-id)