Skip to content

Commit 8c1f81c

Browse files
fix: Flex defaults
1 parent defb8c8 commit 8c1f81c

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

frontend/src/components/BlockFlexLayoutHandler.vue

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
{ label: 'Horizontal', value: 'row', icon: 'arrow-right', hideLabel: true },
77
{ label: 'Vertical', value: 'column', icon: 'arrow-down', hideLabel: true },
88
]"
9-
:modelValue="blockController.getStyle('flexDirection') || 'column'"
9+
:modelValue="blockController.getStyle('flexDirection') || 'row'"
1010
@update:modelValue="
1111
(val: string | number) => blockController.setStyle('flexDirection', val)
1212
"></OptionToggle>
@@ -17,6 +17,7 @@
1717
type="select"
1818
label="Distribution"
1919
:options="[
20+
{ label: '', value: '' },
2021
{ label: 'Space Between', value: 'space-between' },
2122
{ label: 'Space Around', value: 'space-around' },
2223
{ label: 'Space Evenly', value: 'space-evenly' },

frontend/src/components/BlockProperties.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ const layoutSectionProperties = [
392392
value: "grid",
393393
},
394394
],
395-
modelValue: blockController.getStyle("display") || "flex",
395+
modelValue: blockController.getStyle("display"),
396396
};
397397
},
398398
searchKeyWords: "Layout, Display, Flex, Grid, Flexbox, Flex Box, FlexBox",

frontend/src/components/PlacementControl.vue

+3-3
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,9 @@ const placementOptions = [
9898
"bottom-right",
9999
];
100100
101-
const direction = computed(() => blockController.getStyle("flexDirection") as string);
102-
const justifyContent = computed(() => blockController.getStyle("justifyContent") as string);
103-
const alignItems = computed(() => blockController.getStyle("alignItems") as string);
101+
const direction = computed(() => (blockController.getStyle("flexDirection") || "row") as string);
102+
const justifyContent = computed(() => (blockController.getStyle("justifyContent") || "flex-start") as string);
103+
const alignItems = computed(() => (blockController.getStyle("alignItems") || "stretch") as string);
104104
105105
const setAlignment = (alignment: string, spaceBetween: boolean = false) => {
106106
switch (alignment) {

0 commit comments

Comments
 (0)