diff --git a/dist/index.js b/dist/index.js index 12659df1..8b23add1 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1 +1 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["vue-js-modal"]=t():e["vue-js-modal"]=t()}(window,function(){return i={},o.m=n=[function(e,t,n){var i=n(6);"string"==typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);(0,n(4).default)("27d83796",i,!1,{})},function(e,t,n){var i=n(8);"string"==typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);(0,n(4).default)("0e783494",i,!1,{})},function(e,t,n){var i=n(10);"string"==typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);(0,n(4).default)("17757f60",i,!1,{})},function(e,t){e.exports=function(n){var a=[];return a.toString=function(){return this.map(function(e){var t=function(e,t){var n=e[1]||"",i=e[3];if(!i)return n;if(t&&"function"==typeof btoa){var o=function(e){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(e))))+" */"}(i),r=i.sources.map(function(e){return"/*# sourceURL="+i.sourceRoot+e+" */"});return[n].concat(r).concat([o]).join("\n")}return[n].join("\n")}(e,n);return e[2]?"@media "+e[2]+"{"+t+"}":t}).join("")},a.i=function(e,t){"string"==typeof e&&(e=[[null,e,""]]);for(var n={},i=0;in.parts.length&&(i.parts.length=n.parts.length)}else{var r=[];for(o=0;o component must be present on the page.")};a.prototype.$modal={show:function(e){for(var t=arguments.length,n=new Array(1n.parts.length&&(i.parts.length=n.parts.length)}else{var r=[];for(o=0;o component must be present on the page.")};a.prototype.$modal={show:function(e){for(var t=arguments.length,n=new Array(1"+i.css+""}return e}n.r(e),n.d(e,"default",function(){return i})},function(t,e,n){"use strict";n.r(e);var i=n(0),o=n.n(i);for(var r in i)"default"!==r&&function(t){n.d(e,t,function(){return i[t]})}(r);e.default=o.a},function(t,e,n){(t.exports=n(3)(!1)).push([t.i,"\n.vue-modal-resizer {\n display: block;\n overflow: hidden;\n position: absolute;\n width: 12px;\n height: 12px;\n right: 0;\n bottom: 0;\n z-index: 9999999;\n background: transparent;\n cursor: se-resize;\n}\n.vue-modal-resizer::after {\n display: block;\n position: absolute;\n content: '';\n background: transparent;\n left: 0;\n top: 0;\n width: 0;\n height: 0;\n border-bottom: 10px solid #ddd;\n border-left: 10px solid transparent;\n}\n.vue-modal-resizer.clicked::after {\n border-bottom: 10px solid #369be9;\n}\n",""])},function(t,e,n){"use strict";n.r(e);var i=n(1),o=n.n(i);for(var r in i)"default"!==r&&function(t){n.d(e,t,function(){return i[t]})}(r);e.default=o.a},function(t,e,n){(t.exports=n(3)(!1)).push([t.i,"\n.v--modal-block-scroll {\n overflow: hidden;\n width: 100vw;\n}\n.v--modal-overlay {\n position: fixed;\n box-sizing: border-box;\n left: 0;\n top: 0;\n width: 100%;\n height: 100vh;\n background: rgba(0, 0, 0, 0.2);\n z-index: 999;\n opacity: 1;\n}\n.v--modal-overlay.scrollable {\n height: 100%;\n min-height: 100vh;\n overflow-y: auto;\n -webkit-overflow-scrolling: touch;\n}\n.v--modal-overlay .v--modal-background-click {\n width: 100%;\n min-height: 100%;\n height: auto;\n}\n.v--modal-overlay .v--modal-box {\n position: relative;\n overflow: hidden;\n box-sizing: border-box;\n}\n.v--modal-overlay.scrollable .v--modal-box {\n margin-bottom: 2px;\n}\n.v--modal {\n background-color: white;\n text-align: left;\n border-radius: 3px;\n box-shadow: 0 20px 60px -2px rgba(27, 33, 58, 0.4);\n padding: 0;\n}\n.v--modal.v--modal-fullscreen {\n width: 100vw;\n height: 100vh;\n margin: 0;\n left: 0;\n top: 0;\n}\n.v--modal-top-right {\n display: block;\n position: absolute;\n right: 0;\n top: 0;\n}\n.overlay-fade-enter-active,\n.overlay-fade-leave-active {\n transition: all 0.2s;\n}\n.overlay-fade-enter,\n.overlay-fade-leave-active {\n opacity: 0;\n}\n.nice-modal-fade-enter-active,\n.nice-modal-fade-leave-active {\n transition: all 0.4s;\n}\n.nice-modal-fade-enter,\n.nice-modal-fade-leave-active {\n opacity: 0;\n transform: translateY(-20px);\n}\n",""])},function(t,e,n){"use strict";n.r(e);var i=n(2),o=n.n(i);for(var r in i)"default"!==r&&function(t){n.d(e,t,function(){return i[t]})}(r);e.default=o.a},function(t,e,n){(t.exports=n(3)(!1)).push([t.i,"\n.vue-dialog div {\n box-sizing: border-box;\n}\n.vue-dialog .dialog-flex {\n width: 100%;\n height: 100%;\n}\n.vue-dialog .dialog-content {\n flex: 1 0 auto;\n width: 100%;\n padding: 15px;\n font-size: 14px;\n}\n.vue-dialog .dialog-c-title {\n font-weight: 600;\n padding-bottom: 15px;\n}\n.vue-dialog .dialog-c-text {\n}\n.vue-dialog .vue-dialog-buttons {\n display: flex;\n flex: 0 1 auto;\n width: 100%;\n border-top: 1px solid #eee;\n}\n.vue-dialog .vue-dialog-buttons-none {\n width: 100%;\n padding-bottom: 15px;\n}\n.vue-dialog-button {\n font-size: 12px !important;\n background: transparent;\n padding: 0;\n margin: 0;\n border: 0;\n cursor: pointer;\n box-sizing: border-box;\n line-height: 40px;\n height: 40px;\n color: inherit;\n font: inherit;\n outline: none;\n}\n.vue-dialog-button:hover {\n background: rgba(0, 0, 0, 0.01);\n}\n.vue-dialog-button:active {\n background: rgba(0, 0, 0, 0.025);\n}\n.vue-dialog-button:not(:first-of-type) {\n border-left: 1px solid #eee;\n}\n",""])},function(t,e,n){"use strict";n.r(e),n.d(e,"getModalsContainer",function(){return z});function i(){var e=this,t=e.$createElement,n=e._self._c||t;return n("transition",{attrs:{name:e.overlayTransition}},[e.visibility.overlay?n("div",{ref:"overlay",class:e.overlayClass,attrs:{"aria-expanded":e.visibility.overlay.toString(),"data-modal":e.name}},[n("div",{staticClass:"v--modal-background-click",on:{mousedown:function(t){return t.target!==t.currentTarget?null:e.handleBackgroundClick(t)},touchstart:function(t){return t.target!==t.currentTarget?null:e.handleBackgroundClick(t)}}},[n("div",{staticClass:"v--modal-top-right"},[e._t("top-right")],2),e._v(" "),n("transition",{attrs:{name:e.transition},on:{"before-enter":e.beforeTransitionEnter,"after-enter":e.afterTransitionEnter,"after-leave":e.afterTransitionLeave}},[e.visibility.modal?n("div",{ref:"modal",class:e.modalClass,style:e.modalStyle},[e._t("default"),e._v(" "),e.resizable&&!e.isAutoHeight?n("resizer",{attrs:{"min-width":e.minWidth,"min-height":e.minHeight,"max-width":e.maxWidth,"max-height":e.maxHeight},on:{resize:e.handleModalResize}}):e._e()],2):e._e()])],1)]):e._e()])}function o(){var t=this.$createElement;return(this._self._c||t)("div",{class:this.className},[])}function r(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],i=!0,o=!1,r=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);i=!0);}catch(t){o=!0,r=t}finally{try{i||null==s.return||s.return()}finally{if(o)throw r}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function a(e){for(var t=1;t component must be present on the page.")};a.prototype.$modal={show:function(t){for(var e=arguments.length,n=new Array(1"+i.css+""}return e}n.r(e),n.d(e,"default",function(){return i})},function(t,e,n){"use strict";n.r(e);var i=n(0),o=n.n(i);for(var r in i)"default"!==r&&function(t){n.d(e,t,function(){return i[t]})}(r);e.default=o.a},function(t,e,n){(t.exports=n(3)(!1)).push([t.i,"\n.vue-modal-resizer {\n display: block;\n overflow: hidden;\n position: absolute;\n width: 12px;\n height: 12px;\n right: 0;\n bottom: 0;\n z-index: 9999999;\n background: transparent;\n cursor: se-resize;\n}\n.vue-modal-resizer::after {\n display: block;\n position: absolute;\n content: '';\n background: transparent;\n left: 0;\n top: 0;\n width: 0;\n height: 0;\n border-bottom: 10px solid #ddd;\n border-left: 10px solid transparent;\n}\n.vue-modal-resizer.clicked::after {\n border-bottom: 10px solid #369be9;\n}\n",""])},function(t,e,n){"use strict";n.r(e);var i=n(1),o=n.n(i);for(var r in i)"default"!==r&&function(t){n.d(e,t,function(){return i[t]})}(r);e.default=o.a},function(t,e,n){(t.exports=n(3)(!1)).push([t.i,"\n.v--modal-block-scroll {\n overflow: hidden;\n width: 100vw;\n}\n.v--modal-overlay {\n position: fixed;\n box-sizing: border-box;\n left: 0;\n top: 0;\n width: 100%;\n height: 100vh;\n background: rgba(0, 0, 0, 0.2);\n z-index: 999;\n opacity: 1;\n}\n.v--modal-overlay.scrollable {\n height: 100%;\n min-height: 100vh;\n overflow-y: auto;\n -webkit-overflow-scrolling: touch;\n}\n.v--modal-overlay .v--modal-background-click {\n width: 100%;\n min-height: 100%;\n height: auto;\n}\n.v--modal-overlay .v--modal-box {\n position: relative;\n overflow: hidden;\n box-sizing: border-box;\n}\n.v--modal-overlay.scrollable .v--modal-box {\n margin-bottom: 2px;\n}\n.v--modal {\n background-color: white;\n text-align: left;\n border-radius: 3px;\n box-shadow: 0 20px 60px -2px rgba(27, 33, 58, 0.4);\n padding: 0;\n}\n.v--modal.v--modal-fullscreen {\n width: 100vw;\n height: 100vh;\n margin: 0;\n left: 0;\n top: 0;\n}\n.v--modal-top-right {\n display: block;\n position: absolute;\n right: 0;\n top: 0;\n}\n.overlay-fade-enter-active,\n.overlay-fade-leave-active {\n transition: all 0.2s;\n}\n.overlay-fade-enter,\n.overlay-fade-leave-active {\n opacity: 0;\n}\n.nice-modal-fade-enter-active,\n.nice-modal-fade-leave-active {\n transition: all 0.4s;\n}\n.nice-modal-fade-enter,\n.nice-modal-fade-leave-active {\n opacity: 0;\n transform: translateY(-20px);\n}\n",""])},function(t,e,n){"use strict";n.r(e);var i=n(2),o=n.n(i);for(var r in i)"default"!==r&&function(t){n.d(e,t,function(){return i[t]})}(r);e.default=o.a},function(t,e,n){(t.exports=n(3)(!1)).push([t.i,"\n.vue-dialog div {\n box-sizing: border-box;\n}\n.vue-dialog .dialog-flex {\n width: 100%;\n height: 100%;\n}\n.vue-dialog .dialog-content {\n flex: 1 0 auto;\n width: 100%;\n padding: 15px;\n font-size: 14px;\n}\n.vue-dialog .dialog-c-title {\n font-weight: 600;\n padding-bottom: 15px;\n}\n.vue-dialog .dialog-c-text {\n}\n.vue-dialog .vue-dialog-buttons {\n display: flex;\n flex: 0 1 auto;\n width: 100%;\n border-top: 1px solid #eee;\n}\n.vue-dialog .vue-dialog-buttons-none {\n width: 100%;\n padding-bottom: 15px;\n}\n.vue-dialog-button {\n font-size: 12px !important;\n background: transparent;\n padding: 0;\n margin: 0;\n border: 0;\n cursor: pointer;\n box-sizing: border-box;\n line-height: 40px;\n height: 40px;\n color: inherit;\n font: inherit;\n outline: none;\n}\n.vue-dialog-button:hover {\n background: rgba(0, 0, 0, 0.01);\n}\n.vue-dialog-button:active {\n background: rgba(0, 0, 0, 0.025);\n}\n.vue-dialog-button:not(:first-of-type) {\n border-left: 1px solid #eee;\n}\n",""])},function(t,e,n){"use strict";n.r(e),n.d(e,"getModalsContainer",function(){return z});function i(){var e=this,t=e.$createElement,n=e._self._c||t;return n("transition",{attrs:{name:e.overlayTransition}},[e.visibility.overlay?n("div",{ref:"overlay",class:e.overlayClass,attrs:{"aria-expanded":e.visibility.overlay.toString(),"data-modal":e.name}},[n("div",{staticClass:"v--modal-background-click",on:{mousedown:function(t){return t.target!==t.currentTarget?null:e.handleBackgroundClick(t)},touchstart:function(t){return t.target!==t.currentTarget?null:e.handleBackgroundClick(t)}}},[n("div",{staticClass:"v--modal-top-right"},[e._t("top-right")],2),e._v(" "),n("transition",{attrs:{name:e.transition},on:{"before-enter":e.beforeTransitionEnter,"after-enter":e.afterTransitionEnter,"after-leave":e.afterTransitionLeave}},[e.visibility.modal?n("div",{ref:"modal",class:e.modalClass,style:e.modalStyle,attrs:{role:"dialog","aria-modal":"true"}},[e._t("default"),e._v(" "),e.resizable&&!e.isAutoHeight?n("resizer",{attrs:{"min-width":e.minWidth,"min-height":e.minHeight,"max-width":e.maxWidth,"max-height":e.maxHeight},on:{resize:e.handleModalResize}}):e._e()],2):e._e()])],1)]):e._e()])}function o(){var t=this.$createElement;return(this._self._c||t)("div",{class:this.className},[])}function r(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],i=!0,o=!1,r=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);i=!0);}catch(t){o=!0,r=t}finally{try{i||null==s.return||s.return()}finally{if(o)throw r}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function a(e){for(var t=1;t component must be present on the page.")};a.prototype.$modal={show:function(t){for(var e=arguments.length,n=new Array(1 component must be present on the page.")};a.prototype.$modal={show:function(t){for(var e=arguments.length,n=new Array(1 component must be present on the page.")};a.prototype.$modal={show:function(t){for(var e=arguments.length,n=new Array(1 = 0 } }, minHeight: { type: Number, default: 0, - validator (value) { + validator(value) { return value >= 0 } }, @@ -134,21 +136,21 @@ export default { height: { type: [Number, String], default: 300, - validator (value) { + validator(value) { return value === 'auto' || validateNumber(value) } }, pivotX: { type: Number, default: 0.5, - validator (value) { + validator(value) { return value >= 0 && value <= 1 } }, pivotY: { type: Number, default: 0.5, - validator (value) { + validator(value) { return value >= 0 && value <= 1 } } @@ -156,7 +158,7 @@ export default { components: { Resizer }, - data () { + data() { return { visible: false, @@ -184,13 +186,13 @@ export default { mutationObserver: null } }, - created () { + created() { this.setInitialSize() }, /** * Sets global listeners */ - beforeMount () { + beforeMount() { Modal.event.$on('toggle', this.handleToggleEvent) window.addEventListener('resize', this.handleWindowResize) @@ -230,8 +232,10 @@ export default { this.updateRenderedHeight() }) } else { - console.warn('MutationObserver was not found. Vue-js-modal automatic resizing relies ' + - 'heavily on MutationObserver. Please make sure to provide shim for it.') + console.warn( + 'MutationObserver was not found. Vue-js-modal automatic resizing relies ' + + 'heavily on MutationObserver. Please make sure to provide shim for it.' + ) } } @@ -242,7 +246,7 @@ export default { /** * Removes global listeners */ - beforeDestroy () { + beforeDestroy() { Modal.event.$off('toggle', this.handleToggleEvent) window.removeEventListener('resize', this.handleWindowResize) @@ -260,14 +264,14 @@ export default { /** * Returns true if height is set to "auto" */ - isAutoHeight () { + isAutoHeight() { return this.modal.heightType === 'auto' }, /** * Calculates and returns modal position based on the * pivots, window size and modal size */ - position () { + position() { const { viewportHeight, viewportWidth, @@ -293,18 +297,17 @@ export default { * Returns pixel width (if set with %) and makes sure that modal size * fits the window */ - trueModalWidth () { + trueModalWidth() { const { viewportWidth, modal, adaptive, minWidth, maxWidth } = this - const value = modal.widthType === '%' - ? viewportWidth / 100 * modal.width - : modal.width + const value = + modal.widthType === '%' + ? (viewportWidth / 100) * modal.width + : modal.width const max = Math.max(minWidth, Math.min(viewportWidth, maxWidth)) - return adaptive - ? inRange(minWidth, max, value) - : value + return adaptive ? inRange(minWidth, max, value) : value }, /** * Returns pixel height (if set with %) and makes sure that modal size @@ -312,12 +315,20 @@ export default { * * Returns modal.renderedHeight if height set as "auto" */ - trueModalHeight () { - const { viewportHeight, modal, isAutoHeight, adaptive, minHeight, maxHeight } = this + trueModalHeight() { + const { + viewportHeight, + modal, + isAutoHeight, + adaptive, + minHeight, + maxHeight + } = this - const value = modal.heightType === '%' - ? viewportHeight / 100 * modal.height - : modal.height + const value = + modal.heightType === '%' + ? (viewportHeight / 100) * modal.height + : modal.height if (isAutoHeight) { // use renderedHeight when height 'auto' @@ -326,14 +337,12 @@ export default { const max = Math.max(minHeight, Math.min(viewportHeight, maxHeight)) - return adaptive - ? inRange(minHeight, max, value) - : value + return adaptive ? inRange(minHeight, max, value) : value }, /** * Returns class list for screen overlay (modal background) */ - overlayClass () { + overlayClass() { return { 'v--modal-overlay': true, scrollable: this.scrollable && this.isAutoHeight @@ -342,10 +351,10 @@ export default { /** * Returns class list for modal itself */ - modalClass () { + modalClass() { return ['v--modal-box', this.classes] }, - stylesProp () { + stylesProp() { return typeof this.styles === 'string' ? stringStylesToObject(this.styles) : this.styles @@ -353,13 +362,16 @@ export default { /** * CSS styles for position and size of the modal */ - modalStyle () { - return [this.stylesProp, { - top: this.position.top + 'px', - left: this.position.left + 'px', - width: this.trueModalWidth + 'px', - height: this.isAutoHeight ? 'auto' : this.trueModalHeight + 'px' - }, ] + modalStyle() { + return [ + this.stylesProp, + { + top: this.position.top + 'px', + left: this.position.left + 'px', + width: this.trueModalWidth + 'px', + height: this.isAutoHeight ? 'auto' : this.trueModalHeight + 'px' + } + ] } }, watch: { @@ -369,7 +381,7 @@ export default { * inside `setTimeout` and `$nextTick`, after the DOM changes. * This fixes `$refs.modal` `undefined` bug (fixes #15) */ - visible (value) { + visible(value) { // console.log('Activating visible watcher, value: ', value) if (value) { @@ -397,11 +409,9 @@ export default { }, methods: { - handleToggleEvent (name, state, params) { + handleToggleEvent(name, state, params) { if (this.name === name) { - const nextState = typeof state === 'undefined' - ? !this.visible - : state + const nextState = typeof state === 'undefined' ? !this.visible : state this.toggle(nextState, params) } @@ -411,7 +421,7 @@ export default { * if "reset" flag is set to true - this function will be called * every time "beforeOpen" is triggered */ - setInitialSize () { + setInitialSize() { const { modal } = this const width = parseNumber(this.width) const height = parseNumber(this.height) @@ -422,13 +432,13 @@ export default { modal.heightType = height.type }, - handleEscapeKeyUp (event) { + handleEscapeKeyUp(event) { if (event.which === 27 && this.visible) { this.$modal.hide(this.name) } }, - handleWindowResize () { + handleWindowResize() { this.viewportWidth = windowWidthWithoutScrollbar() this.viewportHeight = window.innerHeight @@ -437,7 +447,7 @@ export default { /** * Generates event object */ - createModalEvent (args = {}) { + createModalEvent(args = {}) { return createModalEvent({ name: this.name, ref: this.$refs.modal, @@ -447,7 +457,7 @@ export default { /** * Event handler which is triggered on modal resize */ - handleModalResize (event) { + handleModalResize(event) { this.modal.widthType = 'px' this.modal.width = event.size.width @@ -456,26 +466,21 @@ export default { const { size } = this.modal - this.$emit( - 'resize', - this.createModalEvent({ size }) - ) + this.$emit('resize', this.createModalEvent({ size })) }, /** * Event handler which is triggered on $modal.show and $modal.hide * BeforeEvents: ('before-close' and 'before-open') are `$emit`ed here, * but AfterEvents ('opened' and 'closed') are moved to `watch.visible`. */ - toggle (nextState, params) { + toggle(nextState, params) { const { reset, scrollable, visible } = this if (visible === nextState) { return } - const beforeEventName = visible - ? 'before-close' - : 'before-open' + const beforeEventName = visible ? 'before-close' : 'before-open' if (beforeEventName === 'before-open') { /** @@ -519,20 +524,17 @@ export default { } }, - getDraggableElement () { - const selector = typeof this.draggable !== 'string' - ? '.v--modal-box' - : this.draggable + getDraggableElement() { + const selector = + typeof this.draggable !== 'string' ? '.v--modal-box' : this.draggable - return selector - ? this.$refs.overlay.querySelector(selector) - : null + return selector ? this.$refs.overlay.querySelector(selector) : null }, /** * Event handler that is triggered when background overlay is clicked */ - handleBackgroundClick () { + handleBackgroundClick() { if (this.clickToClose) { this.toggle(false) } @@ -545,7 +547,7 @@ export default { * wrapping afterEvents in `$nextTick` fixes `$refs.modal` undefined bug. * (fixes #15) */ - callAfterEvent (state) { + callAfterEvent(state) { if (state) { this.connectObserver() } else { @@ -556,7 +558,7 @@ export default { this.$emit(eventName, event) }, - addDraggableListeners () { + addDraggableListeners() { if (!this.draggable) { return } @@ -578,8 +580,12 @@ export default { const handleDraggableMousedown = event => { let target = event.target - if (target && - (target.nodeName === 'INPUT' || target.nodeName === 'TEXTAREA' || target.nodeName === 'SELECT')) { + if ( + target && + (target.nodeName === 'INPUT' || + target.nodeName === 'TEXTAREA' || + target.nodeName === 'SELECT') + ) { return } @@ -624,7 +630,7 @@ export default { } }, - removeDraggableListeners () { + removeDraggableListeners() { /** * Ideally this is not needed because "dragger" will be unmounted anyway. */ @@ -635,7 +641,7 @@ export default { * 1. modal opened * 2. MutationObserver's observe callback */ - updateRenderedHeight () { + updateRenderedHeight() { if (this.$refs.modal) { this.modal.renderedHeight = this.$refs.modal.getBoundingClientRect().height } @@ -644,7 +650,7 @@ export default { * Start observing modal's DOM, if childList or subtree changes, * the callback (registered in beforeMount) will be called. */ - connectObserver () { + connectObserver() { if (this.mutationObserver) { this.mutationObserver.observe(this.$refs.overlay, { childList: true, @@ -656,25 +662,25 @@ export default { /** * Disconnects MutationObserver */ - disconnectObserver () { + disconnectObserver() { if (this.mutationObserver) { this.mutationObserver.disconnect() } }, - beforeTransitionEnter () { + beforeTransitionEnter() { this.connectObserver() }, - afterTransitionEnter () { + afterTransitionEnter() { // console.log('after transition enter') }, - afterTransitionLeave () { + afterTransitionLeave() { // console.log('after transition leave') }, - ensureShiftInWindowBounds () { + ensureShiftInWindowBounds() { const { viewportHeight, viewportWidth,