0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-02 04:19:08 -05:00

Merge pull request #5016 from penpot/superalex-bug-render-texts-without-position-data

🐛 Fix render of some texts without position data
This commit is contained in:
Andrey Antukh 2024-08-22 15:43:50 +02:00 committed by GitHub
commit f73e5446ab
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -64,7 +64,8 @@
[{:keys [grow-type id migrate] :as shape} node]
;; Check if we need to update the size because it's auto-width or auto-height
;; Update the position-data of every text fragment
(p/let [position-data (tsp/calc-position-data id)]
(->> (tsp/calc-position-data id)
(p/fmap (fn [position-data]
;; At least one paragraph needs to be inside the bounding box
(when (gsht/overlaps-position-data? shape position-data)
(st/emit! (dwt/update-position-data id position-data)))
@ -81,7 +82,7 @@
(not migrate))
(st/emit! (dwt/resize-text id width height)))))
(st/emit! (dwt/clean-text-modifier id))))
(st/emit! (dwt/clean-text-modifier id))))))
(defn- update-text-modifier
[{:keys [grow-type id] :as shape} node]