|
71 | 71 | }); |
72 | 72 | window.resizeEmulator.bind(resize["do"], 1); |
73 | 73 | _$holder.on('touchstart', function(e) { |
74 | | - return touch.touchStart(e.touches[0].pageX); |
| 74 | + return touch.touchStart(e.originalEvent.touches[0].pageX); |
75 | 75 | }); |
76 | 76 | _$body.on('touchend', function(e) { |
77 | 77 | return touch.touchEnd(); |
78 | 78 | }); |
79 | 79 | _$body.on('touchmove', function(e) { |
80 | | - return touch.touchMove(e.touches[0].pageX); |
| 80 | + return touch.touchMove(e.originalEvent.touches[0].pageX); |
81 | 81 | }); |
82 | 82 | $rootScope.setGalleryIndex = function(index) { |
83 | 83 | return mover.setIndex(index - 0); |
|
96 | 96 |
|
97 | 97 | }).call(this); |
98 | 98 |
|
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 | | - |
117 | 99 | (function() { |
118 | 100 | angular.module('multiGallery').service('GalleryActions', [ |
119 | 101 | 'GalleryEvents', function(GalleryEvents) { |
|
178 | 160 | CycleGenerator.prototype._cycleItems = []; |
179 | 161 |
|
180 | 162 | CycleGenerator.prototype.setItems = function(items) { |
| 163 | + if (!items) { |
| 164 | + return; |
| 165 | + } |
181 | 166 | this._items = items; |
182 | 167 | this._count = items.length; |
183 | 168 | this._cycleItems = []; |
|
407 | 392 | } |
408 | 393 |
|
409 | 394 | ItemsStorage.prototype.setItems = function(items) { |
410 | | - if(!items){return;}; |
| 395 | + if (!items) { |
| 396 | + return; |
| 397 | + } |
411 | 398 | this.count = items.length; |
412 | 399 | this.items = items; |
413 | 400 | this.cycler.setItems(this.items); |
|
1078 | 1065 |
|
1079 | 1066 | }).call(this); |
1080 | 1067 |
|
| 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 | + |
1081 | 1086 | (function() { |
1082 | 1087 | angular.module('multiGallery').service('MoverHolder', function() { |
1083 | 1088 | var MoverHolder; |
|
0 commit comments