mirror of
https://github.com/penpot/penpot.git
synced 2025-07-27 22:37:14 +02:00
🐛 Color library loses association with shapes when exporting/importing the document
This commit is contained in:
parent
3bb2573dec
commit
58466e6488
2 changed files with 33 additions and 0 deletions
|
@ -49,6 +49,7 @@
|
||||||
- Export shapes that are rotated act a bit strange when reimported [Taiga #7585](https://tree.taiga.io/project/penpot/issue/7585)
|
- Export shapes that are rotated act a bit strange when reimported [Taiga #7585](https://tree.taiga.io/project/penpot/issue/7585)
|
||||||
- Penpot crashes when a new colorpicker is created while uploading an image to another instance [Taiga #8119](https://tree.taiga.io/project/penpot/issue/8119)
|
- Penpot crashes when a new colorpicker is created while uploading an image to another instance [Taiga #8119](https://tree.taiga.io/project/penpot/issue/8119)
|
||||||
- Removing Underline and Strikethrough Affects the Previous Text Object [Taiga #8103](https://tree.taiga.io/project/penpot/issue/8103)
|
- Removing Underline and Strikethrough Affects the Previous Text Object [Taiga #8103](https://tree.taiga.io/project/penpot/issue/8103)
|
||||||
|
- Color library loses association with shapes when exporting/importing the document [Taiga #8132](https://tree.taiga.io/project/penpot/issue/8132)
|
||||||
|
|
||||||
## 2.0.3
|
## 2.0.3
|
||||||
|
|
||||||
|
|
|
@ -223,6 +223,32 @@
|
||||||
(uuid? (get item :typography-ref-file))
|
(uuid? (get item :typography-ref-file))
|
||||||
(d/update-when :typography-ref-file resolve)))))))
|
(d/update-when :typography-ref-file resolve)))))))
|
||||||
|
|
||||||
|
(defn resolve-fills-content
|
||||||
|
[fills context]
|
||||||
|
(let [resolve (:resolve context)]
|
||||||
|
(->> fills
|
||||||
|
(mapv
|
||||||
|
(fn [fill]
|
||||||
|
(cond-> fill
|
||||||
|
(uuid? (get fill :fill-color-ref-id))
|
||||||
|
(d/update-when :fill-color-ref-id resolve)
|
||||||
|
|
||||||
|
(uuid? (get fill :fill-color-ref-file))
|
||||||
|
(d/update-when :fill-color-ref-file resolve)))))))
|
||||||
|
|
||||||
|
(defn resolve-strokes-content
|
||||||
|
[fills context]
|
||||||
|
(let [resolve (:resolve context)]
|
||||||
|
(->> fills
|
||||||
|
(mapv
|
||||||
|
(fn [fill]
|
||||||
|
(cond-> fill
|
||||||
|
(uuid? (get fill :stroke-color-ref-id))
|
||||||
|
(d/update-when :stroke-color-ref-id resolve)
|
||||||
|
|
||||||
|
(uuid? (get fill :stroke-color-ref-file))
|
||||||
|
(d/update-when :stroke-color-ref-file resolve)))))))
|
||||||
|
|
||||||
(defn resolve-data-ids
|
(defn resolve-data-ids
|
||||||
[data type context]
|
[data type context]
|
||||||
(let [resolve (:resolve context)]
|
(let [resolve (:resolve context)]
|
||||||
|
@ -238,6 +264,12 @@
|
||||||
(cond-> (= type :text)
|
(cond-> (= type :text)
|
||||||
(d/update-when :content resolve-text-content context))
|
(d/update-when :content resolve-text-content context))
|
||||||
|
|
||||||
|
(cond-> (:fills data)
|
||||||
|
(d/update-when :fills resolve-fills-content context))
|
||||||
|
|
||||||
|
(cond-> (:strokes data)
|
||||||
|
(d/update-when :strokes resolve-strokes-content context))
|
||||||
|
|
||||||
(cond-> (and (= type :frame) (= :grid (:layout data)))
|
(cond-> (and (= type :frame) (= :grid (:layout data)))
|
||||||
(update
|
(update
|
||||||
:layout-grid-cells
|
:layout-grid-cells
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue