From 449f0eda314c699587756641a6f7a0b126cb1fe1 Mon Sep 17 00:00:00 2001 From: Julie Blanc Date: Thu, 5 Mar 2026 16:51:35 +0100 Subject: [PATCH] defaults values from panel --- src/components/ElementPopup.vue | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/components/ElementPopup.vue b/src/components/ElementPopup.vue index 496f0bf..b69a429 100644 --- a/src/components/ElementPopup.vue +++ b/src/components/ElementPopup.vue @@ -692,6 +692,26 @@ watch(fontFamily, async (val) => { if (val && val !== 'sans-serif') await loadFont(val); }); +// Sync disabled special groups with TextSettings defaults +watch(() => textDefaults.fontFamily, (val) => { + if (!settingEnabled.font) fontFamily.value = val; +}); +watch(() => textDefaults.fontSize, (val) => { + if (!settingEnabled.fontSize) { + fontSize.value = val.value; + fontSize.unit = val.unit; + } +}, { deep: true }); +watch(() => textDefaults.lineHeight, (val) => { + if (!settingEnabled.lineHeight) { + lineHeight.value = val.value; + lineHeight.unit = val.unit; + } +}, { deep: true }); +watch(() => textDefaults.color, (val) => { + if (!settingEnabled.color) color.value = val; +}); + // Watchers — simple props (with group guard) for (const prop of styleProps) { watch(prop.get, () => {