update library mode views
This commit is contained in:
@@ -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)
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user