Commit 7bc46d2b authored by christianrhansen's avatar christianrhansen

simplified observerCallback

parent 418972da
......@@ -451,15 +451,13 @@
// observerCallback (entries, observer) {
observerCallback (entries) {
let target = entries[0]
let scrollLeft = this.$el.scrollLeft
if (!target.isIntersecting) {
this.handlerNewCellTemp.visibility = true
if (scrollLeft < this.handlerNewCell.move.x) {
if (Math.sign(target.boundingClientRect.left) === 1) {
this.handlerNewCellTemp.left = window.innerWidth - 40
}
if (scrollLeft > this.handlerNewCell.move.x) {
else {
this.handlerNewCellTemp.left = 0
}
}
......
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