Skip to content

Commit b5380f3

Browse files
committed
Make map and web views the first option for tx outputs
1 parent ffedee3 commit b5380f3

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

src/components/bblock/ExampleViewer.vue

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,9 @@
146146
density="compact"
147147
rounded="1"
148148
>
149-
<v-btn value="code" size="small" prepend-icon="mdi-code-tags">Code</v-btn>
150149
<v-btn v-if="transformOutputGeoJson" value="map" size="small" prepend-icon="mdi-map">Map</v-btn>
151150
<v-btn v-if="transformOutputIsHtml" value="web" size="small" prepend-icon="mdi-web">Web</v-btn>
151+
<v-btn value="code" size="small" prepend-icon="mdi-code-tags">Code</v-btn>
152152
</v-btn-toggle>
153153
<v-spacer />
154154
<copy-to-clipboard-button :text="transformOutputStatus.contents" color="primary" variant="flat">Copy to clipboard</copy-to-clipboard-button>
@@ -303,10 +303,16 @@ const refBBlock = ref(null);
303303
304304
watch(() => props.language, () => {
305305
showTransformDetails.value = false;
306-
transformOutputView.value = 'code';
306+
transformOutputView.value = transformOutputIsHtml.value ? 'web' : 'code';
307307
profilesMenuVisible.value = false;
308308
});
309309
310+
watch(transformOutputGeoJson, (geoJson) => {
311+
if (geoJson && transformOutputView.value === 'code') {
312+
transformOutputView.value = 'map';
313+
}
314+
});
315+
310316
watch(() => props.language?.transformEntry?.profilesValidation, async (pv) => {
311317
if (!pv) return;
312318
const bblocks = await bblockService.getBBlocks(true);

0 commit comments

Comments
 (0)