Skip to content

Commit cfca3f6

Browse files
fixing bugs
1 parent af703b4 commit cfca3f6

File tree

4 files changed

+30
-24
lines changed

4 files changed

+30
-24
lines changed

build/angular-cycle-gallery.js

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,13 @@
7171
});
7272
window.resizeEmulator.bind(resize["do"], 1);
7373
_$holder.on('touchstart', function(e) {
74-
return touch.touchStart(e.touches[0].pageX);
74+
return touch.touchStart(e.originalEvent.touches[0].pageX);
7575
});
7676
_$body.on('touchend', function(e) {
7777
return touch.touchEnd();
7878
});
7979
_$body.on('touchmove', function(e) {
80-
return touch.touchMove(e.touches[0].pageX);
80+
return touch.touchMove(e.originalEvent.touches[0].pageX);
8181
});
8282
$rootScope.setGalleryIndex = function(index) {
8383
return mover.setIndex(index - 0);
@@ -96,24 +96,6 @@
9696

9797
}).call(this);
9898

99-
(function() {
100-
angular.module('multiGallery').directive('galleryConfigBuffer', [
101-
'GalleryConfig', function(GalleryConfig) {
102-
return {
103-
restrict: 'A',
104-
compile: function(scope, $element) {
105-
return {
106-
pre: function(scope, $element, attr) {
107-
return GalleryConfig.setBuffer(attr.galleryConfigBuffer);
108-
}
109-
};
110-
}
111-
};
112-
}
113-
]);
114-
115-
}).call(this);
116-
11799
(function() {
118100
angular.module('multiGallery').service('GalleryActions', [
119101
'GalleryEvents', function(GalleryEvents) {
@@ -178,6 +160,9 @@
178160
CycleGenerator.prototype._cycleItems = [];
179161

180162
CycleGenerator.prototype.setItems = function(items) {
163+
if (!items) {
164+
return;
165+
}
181166
this._items = items;
182167
this._count = items.length;
183168
this._cycleItems = [];
@@ -407,7 +392,9 @@
407392
}
408393

409394
ItemsStorage.prototype.setItems = function(items) {
410-
if(!items){return;};
395+
if (!items) {
396+
return;
397+
}
411398
this.count = items.length;
412399
this.items = items;
413400
this.cycler.setItems(this.items);
@@ -1078,6 +1065,24 @@
10781065

10791066
}).call(this);
10801067

1068+
(function() {
1069+
angular.module('multiGallery').directive('galleryConfigBuffer', [
1070+
'GalleryConfig', function(GalleryConfig) {
1071+
return {
1072+
restrict: 'A',
1073+
compile: function(scope, $element) {
1074+
return {
1075+
pre: function(scope, $element, attr) {
1076+
return GalleryConfig.setBuffer(attr.galleryConfigBuffer);
1077+
}
1078+
};
1079+
}
1080+
};
1081+
}
1082+
]);
1083+
1084+
}).call(this);
1085+
10811086
(function() {
10821087
angular.module('multiGallery').service('MoverHolder', function() {
10831088
var MoverHolder;

0 commit comments

Comments
 (0)