Commit 153eb05e authored by Sascha Herzinger's avatar Sascha Herzinger
Browse files

periodically set SVG HTML position when scroll event is not fired

parent 16511670
Pipeline #4913 passed with stages
in 6 minutes and 27 seconds
......@@ -21,7 +21,8 @@
posX: 0,
posY: 0,
width: 0,
height: 0
height: 0,
setPositionInterval: null
}
},
props: {
......@@ -84,10 +85,12 @@
}
vm.$el.appendChild(this.$refs.htmlContent)
this.$nextTick(this.setPosition)
this.setPositionInterval = window.setInterval(this.setPosition, 1000)
window.addEventListener('scroll', this.setPosition, true)
},
beforeDestroy () {
this.$refs.htmlContent.remove()
window.clearInterval(this.setPositionInterval)
window.removeEventListener('scroll', this.setPosition, true)
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment