perf(core): cleanup computed vars

This commit is contained in:
braks
2023-10-30 13:36:07 +01:00
committed by Braks
parent 3b175a553e
commit 88cfd402ed
3 changed files with 34 additions and 36 deletions
+3 -2
View File
@@ -1,5 +1,6 @@
<script lang="ts" setup>
import { computed, ref } from 'vue'
import { ref } from 'vue'
import { toRef } from '@vueuse/core'
import UserSelection from '../../components/UserSelection/UserSelection.vue'
import NodesSelection from '../../components/NodesSelection/NodesSelection.vue'
import type { GraphNode } from '../../types'
@@ -42,7 +43,7 @@ const prevSelectedEdgesCount = ref(0)
const containerBounds = ref<DOMRect>()
const hasActiveSelection = computed(() => elementsSelectable.value && (isSelecting || userSelectionActive.value))
const hasActiveSelection = toRef(() => elementsSelectable.value && (isSelecting || userSelectionActive.value))
useKeyPress(deleteKeyCode, (keyPressed) => {
if (!keyPressed) {