diff --git a/src/components/BSMap.vue b/src/components/BSMap.vue index da83c6b..f3cd127 100644 --- a/src/components/BSMap.vue +++ b/src/components/BSMap.vue @@ -1,6 +1,6 @@ - handleSelect(index, offset, length)" /> @@ -41,6 +41,14 @@ const style = computed(() => ({ '--bs-map-cols': cols.value, }) as CSSProperties); +function isFocused(row: number): boolean { + const { selection } = editorStore; + return ( + typeof selection != 'undefined' && + selection.row == row + ); +} + function handleSelect(row: number, offset: number, length: number): void { editorStore.selection = { row: row, diff --git a/src/components/BSMap/BSCell.vue b/src/components/BSMap/BSCell.vue index 0da93ce..f38b110 100644 --- a/src/components/BSMap/BSCell.vue +++ b/src/components/BSMap/BSCell.vue @@ -1,5 +1,5 @@ - + emit('select')"> updateRatio(index, ratio)" /> @@ -23,8 +23,7 @@ import BSIcon from './BSIcon.vue'; const props = defineProps<{ src: string; - row: number; - offset: number; + focused: boolean; }>(); const emit = defineEmits<{ diff --git a/src/components/BSMap/BSRow.vue b/src/components/BSMap/BSRow.vue index 9988b17..04b5232 100644 --- a/src/components/BSMap/BSRow.vue +++ b/src/components/BSMap/BSRow.vue @@ -1,12 +1,12 @@ - emit('select', offset, part.length)" /> + emit('select', offset, part.length)" /> - emit('select', offset, part.length)" /> + emit('select', offset, part.length)" /> @@ -14,6 +14,7 @@ diff --git a/src/components/BSMap/BSSelectable.vue b/src/components/BSMap/BSSelectable.vue index 2ea1a8b..35c2b88 100644 --- a/src/components/BSMap/BSSelectable.vue +++ b/src/components/BSMap/BSSelectable.vue @@ -1,32 +1,16 @@