commit: f46adb6724bccc39cbb3f3723f29724dfb600395
parent f6f2e14c195114bc762ea73b97be3101317e145c
Author: Henry Jameson <me@hjkos.com>
Date: Thu, 24 Oct 2024 21:52:56 +0300
fix changing valtype to shadow breaking everything in its wake
Diffstat:
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/src/components/settings_modal/tabs/style_tab/style_tab.js b/src/components/settings_modal/tabs/style_tab/style_tab.js
@@ -616,16 +616,23 @@ export default {
return virtualDirectives[selectedVirtualDirectiveId.value].valType
},
set (value) {
- virtualDirectives[selectedVirtualDirectiveId.value].valType = value
+ const newValType = value
+ let newValue
switch (value) {
case 'shadow':
- virtualDirectives[selectedVirtualDirectiveId.value].value = '0 0 0 #000000'
+ newValue = '0 0 0 #000000 / 1'
break
case 'color':
- virtualDirectives[selectedVirtualDirectiveId.value].value = '#000000'
+ newValue = '#000000'
break
default:
- virtualDirectives[selectedVirtualDirectiveId.value].value = 'none'
+ newValue = 'none'
+ }
+ const newName = virtualDirectives[selectedVirtualDirectiveId.value].name
+ virtualDirectives[selectedVirtualDirectiveId.value] = {
+ name: newName,
+ value: newValue,
+ valType: newValType
}
}
})