diff --git a/src/js/components/horizontal-scrollbar.vue b/src/js/components/horizontal-scrollbar.vue index aeb2b73..f21b5e9 100644 --- a/src/js/components/horizontal-scrollbar.vue +++ b/src/js/components/horizontal-scrollbar.vue @@ -1,163 +1,193 @@ - - - - + + + + diff --git a/src/js/components/vertical-scrollbar.vue b/src/js/components/vertical-scrollbar.vue index dc7bb07..3cbbd0e 100644 --- a/src/js/components/vertical-scrollbar.vue +++ b/src/js/components/vertical-scrollbar.vue @@ -1,179 +1,188 @@ - - - - + + + + diff --git a/src/js/components/vue-scrollbar.vue b/src/js/components/vue-scrollbar.vue index 3e15c22..a6af5a7 100644 --- a/src/js/components/vue-scrollbar.vue +++ b/src/js/components/vue-scrollbar.vue @@ -1,322 +1,492 @@ - - - - - + })); // https://github.com/facebook/flow/issues/285 + window.addEventListener('test-passive', null, opts); + } catch (e) {} + }, + mounted () { + this.calculateSize() + + // Attach The Event for Responsive View + window.addEventListener('resize', this.calculateSize) + document.addEventListener('mousemove', this.checkAutoScroll, false) + document.addEventListener('touchmove', this.checkAutoScroll, this.supportsPassive ? {passive: false} : false) + }, + + updated () + { + const self = this; + this.$nextTick(function() + { + setTimeout(function() + { + self.calculateSize() + },50) + }) + }, + + beforeDestroy (){ + // Remove Event + window.removeEventListener('resize', this.calculateSize) + document.removeEventListener('mousemove', this.checkAutoScroll) + document.removeEventListener('touchmove', this.checkAutoScroll) + } + + } + + + +