mirror of
https://github.com/penpot/penpot.git
synced 2026-09-10 14:09:17 +00:00
🐛 Fix text override is lost after switch
This commit is contained in:
parent
fd596a1371
commit
5e6af5aea9
@ -62,6 +62,7 @@
|
|||||||
- Fix drag & drop functionality is swapping instead or reordering [Taiga #12254](https://tree.taiga.io/project/penpot/issue/12254)
|
- Fix drag & drop functionality is swapping instead or reordering [Taiga #12254](https://tree.taiga.io/project/penpot/issue/12254)
|
||||||
- Fix variants not syncronizing tokens on switch [Taiga #12290](https://tree.taiga.io/project/penpot/issue/12290)
|
- Fix variants not syncronizing tokens on switch [Taiga #12290](https://tree.taiga.io/project/penpot/issue/12290)
|
||||||
- Fix incorrect behavior of Alt + Drag for variants [Taiga #12309](https://tree.taiga.io/project/penpot/issue/12309)
|
- Fix incorrect behavior of Alt + Drag for variants [Taiga #12309](https://tree.taiga.io/project/penpot/issue/12309)
|
||||||
|
- Fix text override is lost after switch [Taiga #12269](https://tree.taiga.io/project/penpot/issue/12269)
|
||||||
|
|
||||||
## 2.10.1
|
## 2.10.1
|
||||||
|
|
||||||
|
|||||||
@ -249,12 +249,16 @@
|
|||||||
(defn equal-attrs?
|
(defn equal-attrs?
|
||||||
"Given a text structure, and a map of attrs, check that all the internal attrs in
|
"Given a text structure, and a map of attrs, check that all the internal attrs in
|
||||||
paragraphs and sentences have the same attrs"
|
paragraphs and sentences have the same attrs"
|
||||||
[item attrs]
|
([item attrs]
|
||||||
(let [item-attrs (dissoc item :text :type :key :children)]
|
;; Ignore the root attrs of the content. We only want to check paragraphs and sentences
|
||||||
(and
|
(equal-attrs? item attrs true))
|
||||||
(or (empty? item-attrs)
|
([item attrs ignore?]
|
||||||
(= attrs (dissoc item :text :type :key :children)))
|
(let [item-attrs (dissoc item :text :type :key :children)]
|
||||||
(every? #(equal-attrs? % attrs) (:children item)))))
|
(and
|
||||||
|
(or ignore?
|
||||||
|
(empty? item-attrs)
|
||||||
|
(= attrs (dissoc item :text :type :key :children)))
|
||||||
|
(every? #(equal-attrs? % attrs false) (:children item))))))
|
||||||
|
|
||||||
(defn get-first-paragraph-text-attrs
|
(defn get-first-paragraph-text-attrs
|
||||||
"Given a content text structure, extract it's first paragraph
|
"Given a content text structure, extract it's first paragraph
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user