diff --git a/js/adapt-contrib-hotgraphic.js b/js/adapt-contrib-hotgraphic.js index 44760d4..350a88b 100644 --- a/js/adapt-contrib-hotgraphic.js +++ b/js/adapt-contrib-hotgraphic.js @@ -21,17 +21,11 @@ define(function(require) { }, events: function () { - return Adapt.device.touch==false ? { + return { 'click .hotgraphic-graphic-pin':'openHotGraphic', 'click .hotgraphic-popup-done':'closeHotGraphic', 'click .hotgraphic-popup-nav .back':'previousHotGraphic', 'click .hotgraphic-popup-nav .next':'nextHotGraphic' - }:{ - 'click .hotgraphic-graphic-pin':'openHotGraphic', - 'click .hotgraphic-popup-done':'closeHotGraphic', - 'click .hotgraphic-popup-nav .back':'previousHotGraphic', - 'click .hotgraphic-popup-nav .next':'nextHotGraphic', - 'touchstart .hotgraphic-popup-inner':'swipeHotGraphic' } }, @@ -93,21 +87,6 @@ define(function(require) { this.$('.hotgraphic-item').eq(currentIndex).focus(); }, - swipeHotGraphic:function(event){ - event.preventDefault(); - var originalX = event.originalEvent.touches[0].pageX - this.$('.hotgraphic-popup-inner').one('touchmove', _.bind( - function (event) { - event.preventDefault(); - if (event.originalEvent.touches[0].pageX < originalX) { - this.nextHotGraphic(event); - } else { - this.previousHotGraphic(event); - } - }, this) - ); - }, - previousHotGraphic: function (event) { event.preventDefault(); var currentIndex = this.$('.hotgraphic-item.active').index();