add base scrolling on node opening
This commit is contained in:
@@ -95,6 +95,13 @@ export default {
|
||||
}
|
||||
this.$emit('select-node', ids)
|
||||
}
|
||||
},
|
||||
|
||||
updated () {
|
||||
const smarphoneStickyNav = document.querySelector('.node-view-child-list.smartphone')
|
||||
const offset = smarphoneStickyNav ? smarphoneStickyNav.getBoundingClientRect().height : 0
|
||||
const nodeviews = this.$el.querySelectorAll('.node-view')
|
||||
document.querySelector('main').scrollTo(0, nodeviews[nodeviews.length - 1].offsetTop - offset)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user