improve NodeView components and style

This commit is contained in:
axolotle
2021-06-24 16:13:31 +02:00
parent f4d81dffcf
commit a25123f4f9
13 changed files with 54 additions and 71 deletions
-17
View File
@@ -14,7 +14,6 @@
>
<node-view-child-list
:children="parent.children"
:parent-id="parent.id"
smartphone
@open-child="$emit('open-node', { parentId: parent.id, ...$event })"
/>
@@ -69,12 +68,6 @@ export default {
nodes: { type: Array, required: true }
},
data () {
return {
height: undefined
}
},
computed: {
stackHeight () {
return Math.min(150 / (this.nodes.length - 1), 75)
@@ -82,18 +75,9 @@ export default {
},
methods: {
updateSize () {
this.height = this.$el.getBoundingClientRect().height
},
getChildrenStackHeight (childrenLen) {
return this.stackHeight / childrenLen || this.stackHeight
}
},
mounted () {
window.addEventListener('resize', () => this.updateSize())
this.updateSize()
}
}
</script>
@@ -101,7 +85,6 @@ export default {
<style lang="scss" scoped>
.node-book {
min-height: 100%;
// top: -100%;
@include media-breakpoint-up($layout-bp) {
height: 100%;