From 0c84ff479539452b704bdc5882912b330515dd50 Mon Sep 17 00:00:00 2001 From: Chris Steele Date: Tue, 28 Jan 2014 09:37:06 +0000 Subject: [PATCH] Removed swipe listener --- js/adapt-contrib-hotgraphic.js | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) 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();