🐛 Fix add/remove fills to text nodes

This commit is contained in:
Aitor Moreno
2026-01-26 14:57:40 +01:00
committed by Belén Albeza
parent 8d1bc6c50c
commit de41cb5488
2 changed files with 4 additions and 3 deletions

View File

@@ -214,8 +214,8 @@
ptk/WatchEvent
(watch [_ state _]
(let [change-fn
(fn [shape attrs]
(update shape :fills types.fills/prepend attrs))
(fn [node attrs]
(update node :fills types.fills/prepend attrs))
undo-id
(js/Symbol)]
(rx/concat

View File

@@ -238,7 +238,8 @@ export class SelectionController extends EventTarget {
#applyStylesFromElementToCurrentStyle(element) {
for (let index = 0; index < element.style.length; index++) {
const styleName = element.style.item(index);
if (styleName === "--fills") {
// Only merge fill styles from text spans.
if (!isTextSpan(element) && styleName === "--fills") {
continue;
}
let styleValue = element.style.getPropertyValue(styleName);