improve NodeView components and style
This commit is contained in:
@@ -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%;
|
||||
|
||||
Reference in New Issue
Block a user