diff --git a/dist/iwmlib.js b/dist/iwmlib.js index db06854..8244e1f 100644 --- a/dist/iwmlib.js +++ b/dist/iwmlib.js @@ -2638,6 +2638,7 @@ * @param {object} [opts] - An options object. See the hammer documentation for more details. */ static on(types, elements, cb, opts = {}) { + opts = Object.assign({}, { }, opts); @@ -3754,6 +3755,11 @@ this.onCapture = null; this.element = element; if (stopEvents === 'auto') { + /* + The events have to be stopped in Safari, otherwise the whole page will be zoomed with + a pinch gesture (preventDefault in method preventPinch). In order to enable the + movement of scatter objects, the touchmove event has to be bound again. + */ if (Capabilities.isSafari) { document.addEventListener( 'touchmove', @@ -4744,7 +4750,6 @@ /* Buttons are not guaranteed to exist. */ if (this.infoBtn) { InteractionMapper$1.on('tap', this.infoBtn, event => this.flip.start()); - this.enable(this.infoBtn); } if (this.backBtn) { diff --git a/dist/iwmlib.pixi.js b/dist/iwmlib.pixi.js index aba397f..169c18d 100644 --- a/dist/iwmlib.pixi.js +++ b/dist/iwmlib.pixi.js @@ -5805,6 +5805,7 @@ * @param {object} [opts] - An options object. See the hammer documentation for more details. */ static on(types, elements, cb, opts = {}) { + opts = Object.assign({}, { }, opts); @@ -7615,7 +7616,6 @@ /* Buttons are not guaranteed to exist. */ if (this.infoBtn) { InteractionMapper$1.on('tap', this.infoBtn, event => this.flip.start()); - this.enable(this.infoBtn); } if (this.backBtn) { diff --git a/lib/flippable.html b/lib/flippable.html index e656c34..ed7d0b2 100644 --- a/lib/flippable.html +++ b/lib/flippable.html @@ -66,7 +66,7 @@ templates. diff --git a/lib/flippable.js b/lib/flippable.js index c85adb8..836c40c 100644 --- a/lib/flippable.js +++ b/lib/flippable.js @@ -404,7 +404,6 @@ export class DOMFlippable { /* Buttons are not guaranteed to exist. */ if (this.infoBtn) { InteractionMapper.on('tap', this.infoBtn, event => this.flip.start()) - this.enable(this.infoBtn) } if (this.backBtn) { diff --git a/lib/interaction.js b/lib/interaction.js index a63c6d9..6d23405 100755 --- a/lib/interaction.js +++ b/lib/interaction.js @@ -1032,6 +1032,7 @@ export class InteractionMapper extends InteractionDelegate { * @param {object} [opts] - An options object. See the hammer documentation for more details. */ static on(types, elements, cb, opts = {}) { + opts = Object.assign({}, { }, opts) diff --git a/lib/scatter.js b/lib/scatter.js index ceb4c23..dc141bf 100644 --- a/lib/scatter.js +++ b/lib/scatter.js @@ -887,6 +887,11 @@ export class DOMScatterContainer { this.onCapture = null this.element = element if (stopEvents === 'auto') { + /* + The events have to be stopped in Safari, otherwise the whole page will be zoomed with + a pinch gesture (preventDefault in method preventPinch). In order to enable the + movement of scatter objects, the touchmove event has to be bound again. + */ if (Capabilities.isSafari) { document.addEventListener( 'touchmove',