update library mode views

This commit is contained in:
axolotle
2021-06-10 18:20:30 +02:00
parent 635df76702
commit 94d79402f9
3 changed files with 34 additions and 27 deletions
+6
View File
@@ -15,6 +15,7 @@
<node-view
:node="texts[i]"
mode="card"
@open-node="onOpen(texts[i])"
/>
</foreignObject>
</g>
@@ -60,6 +61,11 @@ export default {
updateSize () {
const { width, height } = this.$refs.svg.getBoundingClientRect()
Object.assign(this.$data, { width, height })
},
onOpen (node) {
// FIXME ALSO CHECK IF PARENT
this.$emit('open-node', node.id)
}
},