0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-03-13 16:21:57 -05:00

🐛 Creates a migration to invalidate texts-position-data

This commit is contained in:
alonso.torres 2022-05-24 23:33:21 +02:00
parent 97c9035cfd
commit 525da266b8
2 changed files with 16 additions and 1 deletions

View file

@ -9,7 +9,7 @@
[app.common.colors :as clr]
[app.common.uuid :as uuid]))
(def file-version 17)
(def file-version 18)
(def default-color clr/gray-20)
(def root uuid/zero)

View file

@ -400,5 +400,20 @@
(update :pages-index d/update-vals update-container)
(update :components d/update-vals update-container))))
;;Remove position-data to solve a bug with the text positioning
(defmethod migrate 18
[data]
(letfn [(update-object [object]
(cond-> object
(cph/text-shape? object)
(dissoc :position-data)))
(update-container [container]
(update container :objects d/update-vals update-object))]
(-> data
(update :pages-index d/update-vals update-container)
(update :components d/update-vals update-container))))
;; TODO: pending to do a migration for delete already not used fill
;; and stroke props. This should be done for >1.14.x version.