Skip to content
This repository has been archived by the owner on Dec 20, 2023. It is now read-only.

Commit

Permalink
Updated build file for new build
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelgt04 committed Mar 14, 2018
1 parent efd0553 commit b477a3c
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,17 +188,18 @@ return /******/ (function(modules) { // webpackBootstrap
}, {
key: 'addEvents',
value: function addEvents(type) {
var iframeDocument = document.getElementById('modal-editor-frame').contentWindow.document;
switch (type) {
case 'mouse':
{
document.addEventListener('mousemove', this.onMouseOrTouchMove);
document.addEventListener('mouseup', this.onInteractionEnd);
iframeDocument.addEventListener('mousemove', this.onMouseOrTouchMove);
iframeDocument.addEventListener('mouseup', this.onInteractionEnd);
break;
}
case 'touch':
{
document.addEventListener('touchmove', this.onMouseOrTouchMove);
document.addEventListener('touchend', this.onInteractionEnd);
iframeDocument.addEventListener('touchmove', this.onMouseOrTouchMove);
iframeDocument.addEventListener('touchend', this.onInteractionEnd);
break;
}
default: // nothing
Expand All @@ -207,10 +208,11 @@ return /******/ (function(modules) { // webpackBootstrap
}, {
key: 'removeEvents',
value: function removeEvents() {
document.removeEventListener('mousemove', this.onMouseOrTouchMove);
document.removeEventListener('mouseup', this.onInteractionEnd);
document.removeEventListener('touchmove', this.onMouseOrTouchMove);
document.removeEventListener('touchend', this.onInteractionEnd);
var iframeDocument = document.getElementById('modal-editor-frame').contentWindow.document;
iframeDocument.removeEventListener('mousemove', this.onMouseOrTouchMove);
iframeDocument.removeEventListener('mouseup', this.onInteractionEnd);
iframeDocument.removeEventListener('touchmove', this.onMouseOrTouchMove);
iframeDocument.removeEventListener('touchend', this.onInteractionEnd);
}
}, {
key: 'updateSliderValue',
Expand Down

0 comments on commit b477a3c

Please sign in to comment.