1
0
mirror of https://github.com/lana-k/sqliteviz.git synced 2026-05-06 20:09:18 +08:00

tests for graph editor

This commit is contained in:
lana-k
2026-02-28 16:53:43 +01:00
parent 4f6efb5bda
commit 534b186d76
3 changed files with 326 additions and 5 deletions

View File

@@ -288,7 +288,7 @@ export default {
initOptions: Object,
showViewSettings: Boolean
},
emits: ['update', 'selectItem', 'deselectItem'],
emits: ['update', 'selectItem', 'clearSelection'],
data() {
return {
graph: new Graph({ multi: true, allowSelfLoops: true }),
@@ -572,7 +572,7 @@ export default {
clearSelection() {
this.selectedNodeId = undefined
this.selectedEdgeId = undefined
this.$emit('deselectItem')
this.$emit('clearSelection')
},
updateHighlightNodeMode(mode) {
this.settings.style.highlightMode = mode

View File

@@ -32,7 +32,7 @@
:showViewSettings="showViewSettings"
@update="$emit('update')"
@selectItem="selectedItem = $event"
@deselectItem="selectedItem = null"
@clearSelection="selectedItem = null"
/>
</div>
</template>
@@ -52,7 +52,7 @@
import 'react-chart-editor/lib/react-chart-editor.css'
import GraphEditor from '@/components/Graph/GraphEditor.vue'
import { dataSourceIsValid } from '@/lib/graphHelper'
import ValueViewer from '@/components/ValueViewer'
import ValueViewer from '@/components/ValueViewer.vue'
import Splitpanes from '@/components/Common/Splitpanes'
export default {
@@ -78,7 +78,7 @@ export default {
data() {
return {
resizeObserver: null,
selectedItem: {}
selectedItem: null
}
},
computed: {