mirror of https://github.com/penpot/penpot.git
🐛 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 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 text override is lost after switch [Taiga #12269](https://tree.taiga.io/project/penpot/issue/12269)
|
||||
|
||||
## 2.10.1
|
||||
|
||||
|
|
|
|||
|
|
@ -249,12 +249,16 @@
|
|||
(defn equal-attrs?
|
||||
"Given a text structure, and a map of attrs, check that all the internal attrs in
|
||||
paragraphs and sentences have the same attrs"
|
||||
[item attrs]
|
||||
(let [item-attrs (dissoc item :text :type :key :children)]
|
||||
(and
|
||||
(or (empty? item-attrs)
|
||||
(= attrs (dissoc item :text :type :key :children)))
|
||||
(every? #(equal-attrs? % attrs) (:children item)))))
|
||||
([item attrs]
|
||||
;; Ignore the root attrs of the content. We only want to check paragraphs and sentences
|
||||
(equal-attrs? item attrs true))
|
||||
([item attrs ignore?]
|
||||
(let [item-attrs (dissoc item :text :type :key :children)]
|
||||
(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
|
||||
"Given a content text structure, extract it's first paragraph
|
||||
|
|
|
|||
Loading…
Reference in New Issue