Skip to content

Commit 485cfca

Browse files
committed
Fix - VueUiWorld - Override null values in config
1 parent cd38235 commit 485cfca

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

TestingArena/ArenaVueUiWorld.vue

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,17 @@ const model = ref([
241241
const config = computed(() => {
242242
const c = convertArrayToObject(model.value);
243243
return {
244-
...c
244+
...c,
245+
style: {
246+
...c.style,
247+
chart: {
248+
...c.style.chart,
249+
dimensions: {
250+
height: null,
251+
width: null
252+
}
253+
}
254+
}
245255
}
246256
});
247257

src/components/vue-ui-world.vue

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,18 @@ function prepareConfig() {
8484
mergedConfig.style.chart.territory.colors.max = palette[0];
8585
}
8686
87+
if (props.config && hasDeepProperty(props.config, 'style.chart.dimensions.width')) {
88+
mergedConfig.style.chart.dimensions.width = props.config.style.chart.dimensions.width;
89+
} else {
90+
mergedConfig.style.chart.dimensions.width = null;
91+
}
92+
93+
if (props.config && hasDeepProperty(props.config, 'style.chart.dimensions.height')) {
94+
mergedConfig.style.chart.dimensions.height = props.config.style.chart.dimensions.height;
95+
} else {
96+
mergedConfig.style.chart.dimensions.height = null;
97+
}
98+
8799
// --------------------------------------------------------------------
88100
89101
return mergedConfig;

0 commit comments

Comments
 (0)