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

Commit

Permalink
Merge pull request #3 from appcues/updated-build-file
Browse files Browse the repository at this point in the history
Updated build file for new build
  • Loading branch information
michaelgt04 authored Mar 14, 2018
2 parents efd0553 + b477a3c commit 0352739
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 0352739

Please sign in to comment.