-
+
+ updateRatio(index, ratio)" />
@@ -22,7 +22,7 @@ import BSSelectable from './BSSelectable.vue';
import BSIcon from './BSIcon.vue';
const props = defineProps<{
- content: string;
+ src: string;
row: number;
offset: number;
}>();
@@ -32,17 +32,15 @@ const editorStore = useEditorStore();
const ratio = ref(1);
const parts = computed(() => {
- if (!props.content) return;
+ if (!props.src) return;
- const [nonParam, ...params] = props.content.split('!_');
+ const [nonParam, ...params] = props.src.split('!_');
const [nonLink, ...links] = nonParam.split('!@');
const icons = nonLink.split('!~').filter((icon) => !!icon);
return { icons, links, params };
});
-const stacked = computed(() => !!parts.value && parts.value.icons.length > 1);
-
const style = computed(() => ({
...styleFromParams(parts.value?.params?.[0], true),
'--bs-map-cell-ratio': (ratio.value == 1 ? undefined : ratio.value),
@@ -52,7 +50,7 @@ function handleClick(): void {
editorStore.selection = {
row: props.row,
offset: props.offset,
- length: props.content.length,
+ length: props.src.length,
from: 'preview',
};
}
diff --git a/src/components/BSMap/BSIcon.vue b/src/components/BSMap/BSIcon.vue
index a18c3cd..d8fe71c 100644
--- a/src/components/BSMap/BSIcon.vue
+++ b/src/components/BSMap/BSIcon.vue
@@ -1,8 +1,8 @@
-
-
{{ text.data }}
+
+ {{ parts.data }}
-
+