fotoramajs 4.3.3 → 4.3.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fotoramajs (4.3.3)
4
+ fotoramajs (4.3.4.1)
5
5
  jquery-rails (>= 2.1.0)
6
6
  sprockets (>= 2)
7
7
 
@@ -30,7 +30,7 @@ GEM
30
30
  railties (>= 3.0, < 5.0)
31
31
  thor (>= 0.14, < 2.0)
32
32
  minitest (4.7.5)
33
- multi_json (1.7.9)
33
+ multi_json (1.8.0)
34
34
  rack (1.5.2)
35
35
  rack-test (0.6.2)
36
36
  rack (>= 1.0)
@@ -1,3 +1,3 @@
1
1
  module Fotoramajs
2
- VERSION = "4.3.3"
2
+ VERSION = "4.3.4.1"
3
3
  end
@@ -1,7 +1,7 @@
1
1
  /*!
2
- * Fotorama 4.3.3 | http://fotorama.io/license/
2
+ * Fotorama 4.3.4.1 | http://fotorama.io/license/
3
3
  */
4
- (function (window, document, $, undefined) {
4
+ (function (window, document, location, $, undefined) {
5
5
  "use strict";
6
6
  // My Underscore :-)
7
7
  var _ = {};
@@ -543,7 +543,7 @@ function bindTransitionEnd ($el) {
543
543
  };
544
544
  el.addEventListener(transitionEndEvent[Modernizr.prefixed('transition')], function (e) {
545
545
  elData.tProp && e.propertyName.match(elData.tProp) && elData.onEndFn();
546
- });
546
+ }, false);
547
547
  elData.tEnd = true;
548
548
  }
549
549
 
@@ -838,9 +838,9 @@ function findShadowEdge (pos, min, max) {
838
838
  return min === max ? false : pos <= min ? 'left' : pos >= max ? 'right' : 'left right';
839
839
  }
840
840
 
841
- function getIndexFromHash (hash, data, ok) {
841
+ function getIndexFromHash (hash, data, ok, startindex) {
842
842
  if (!ok) return false;
843
- if (!isNaN(hash)) return hash - 1;
843
+ if (!isNaN(hash)) return hash - (startindex ? 0 : 1);
844
844
 
845
845
  var index;
846
846
 
@@ -1075,9 +1075,11 @@ function touch ($el, options) {
1075
1075
  yWin = xyDiff < 0;
1076
1076
 
1077
1077
  if (touchFLAG && !tail.checked) {
1078
- touchEnabledFLAG = xWin;
1079
- touchEnabledFLAG && e.preventDefault();
1078
+ if (touchEnabledFLAG = xWin) {
1079
+ e.preventDefault();
1080
+ }
1080
1081
  } else {
1082
+ //console.log('onMove e.preventDefault');
1081
1083
  e.preventDefault();
1082
1084
  (options.onMove || noop).call(el, e, {touch: touchFLAG});
1083
1085
  }
@@ -1106,6 +1108,7 @@ function touch ($el, options) {
1106
1108
  }
1107
1109
 
1108
1110
  function onOtherStart () {
1111
+ if (tail.flow) return;
1109
1112
  clearTimeout(docTouchTimeout);
1110
1113
  docTouchTimeout = setTimeout(function () {
1111
1114
  tail.flow = true;
@@ -1113,6 +1116,7 @@ function touch ($el, options) {
1113
1116
  }
1114
1117
 
1115
1118
  function onOtherEnd () {
1119
+ if (!tail.flow) return;
1116
1120
  clearTimeout(docTouchTimeout);
1117
1121
  docTouchTimeout = setTimeout(function () {
1118
1122
  tail.flow = false;
@@ -1120,19 +1124,20 @@ function touch ($el, options) {
1120
1124
  }
1121
1125
 
1122
1126
  if (MS_POINTER) {
1123
- el[addEventListener]('MSPointerDown', onStart);
1124
- document[addEventListener]('MSPointerMove', onMove);
1125
- document[addEventListener]('MSPointerCancel', onEnd);
1126
- document[addEventListener]('MSPointerUp', onEnd);
1127
+ el[addEventListener]('MSPointerDown', onStart, false);
1128
+ document[addEventListener]('MSPointerMove', onMove, false);
1129
+ document[addEventListener]('MSPointerCancel', onEnd, false);
1130
+ document[addEventListener]('MSPointerUp', onEnd, false);
1127
1131
  } else {
1128
1132
  if (el[addEventListener]) {
1129
- el[addEventListener]('touchstart', onStart);
1130
- el[addEventListener]('touchmove', onMove);
1131
- el[addEventListener]('touchend', onEnd);
1133
+ el[addEventListener]('touchstart', onStart, false);
1134
+ el[addEventListener]('touchmove', onMove, false);
1135
+ el[addEventListener]('touchend', onEnd, false);
1132
1136
 
1133
- document[addEventListener]('touchstart', onOtherStart);
1134
- document[addEventListener]('touchend', onOtherEnd);
1135
- window[addEventListener]('scroll', onOtherEnd);
1137
+ document[addEventListener]('touchstart', onOtherStart, false);
1138
+ document[addEventListener]('touchend', onOtherEnd, false);
1139
+ document[addEventListener]('touchcancel', onOtherEnd, false);
1140
+ window[addEventListener]('scroll', onOtherEnd, false);
1136
1141
  }
1137
1142
 
1138
1143
  $el.on('mousedown', onStart);
@@ -1219,7 +1224,7 @@ function moveOnTouch ($el, options) {
1219
1224
  }
1220
1225
 
1221
1226
  if (!tail.noMove) {
1222
- $el.css(getTranslate(moveElPos));
1227
+ $el.css(getTranslate(moveElPos, options._001));
1223
1228
  if (!movedFLAG) {
1224
1229
  movedFLAG = true;
1225
1230
  // only for mouse
@@ -1312,27 +1317,7 @@ function moveOnTouch ($el, options) {
1312
1317
 
1313
1318
  return tail;
1314
1319
  }
1315
- var $oooo = $(div('', div(ooooClass))),
1316
- ooooInterval,
1317
- ooooStep = function () {
1318
- $oooo.attr('class', ooooClass + ' ' + ooooClass + '--' + ooooI);
1319
- ooooI++;
1320
- if (ooooI > 4) ooooI = 0;
1321
- },
1322
- ooooI;
1323
-
1324
- function ooooStart ($el) {
1325
- ooooStop(true);
1326
- $oooo.appendTo($el);
1327
- ooooI = 0;
1328
- ooooStep();
1329
- ooooInterval = setInterval(ooooStep, 200);
1330
- }
1331
1320
 
1332
- function ooooStop (leave) {
1333
- leave || $oooo.detach();
1334
- clearInterval(ooooInterval);
1335
- }
1336
1321
 
1337
1322
  jQuery.Fotorama = function ($fotorama, opts) {
1338
1323
  $HTML = $HTML || $('html');
@@ -1511,7 +1496,7 @@ jQuery.Fotorama = function ($fotorama, opts) {
1511
1496
  if (FLAG) {
1512
1497
  $fotorama
1513
1498
  .html('')
1514
- .addClass(stampClass)
1499
+ .addClass(_fotoramaClass + ' ' + stampClass)
1515
1500
  .append($wrap)
1516
1501
  .before($style)
1517
1502
  .before($anchor);
@@ -1863,6 +1848,28 @@ jQuery.Fotorama = function ($fotorama, opts) {
1863
1848
  });
1864
1849
  }
1865
1850
 
1851
+ var $oooo = $(div('', div(ooooClass))),
1852
+ ooooInterval,
1853
+ ooooStep = function () {
1854
+ $oooo.attr('class', ooooClass + ' ' + ooooClass + '--' + ooooI);
1855
+ ooooI++;
1856
+ if (ooooI > 4) ooooI = 0;
1857
+ },
1858
+ ooooI;
1859
+
1860
+ function ooooStart ($el) {
1861
+ ooooStop(true);
1862
+ $oooo.appendTo($el);
1863
+ ooooI = 0;
1864
+ ooooStep();
1865
+ ooooInterval = setInterval(ooooStep, 200);
1866
+ }
1867
+
1868
+ function ooooStop (leave) {
1869
+ leave || $oooo.detach();
1870
+ clearInterval(ooooInterval);
1871
+ }
1872
+
1866
1873
  function updateFotoramaState () {
1867
1874
  var $frame = that.activeFrame[STAGE_FRAME_KEY];
1868
1875
 
@@ -2193,15 +2200,17 @@ jQuery.Fotorama = function ($fotorama, opts) {
2193
2200
 
2194
2201
  var _activeIndex = activeIndex;
2195
2202
 
2196
- changeAutoplay.t = setTimeout(function () {
2197
- var frameData = that.activeFrame[STAGE_FRAME_KEY].data();
2198
- waitFor(function () {
2199
- return frameData.state || _activeIndex !== activeIndex;
2200
- }, function () {
2203
+
2204
+ var frameData = that.activeFrame[STAGE_FRAME_KEY].data();
2205
+ waitFor(function () {
2206
+ return frameData.state || _activeIndex !== activeIndex;
2207
+ }, function () {
2208
+ changeAutoplay.t = setTimeout(function () {
2201
2209
  if (pausedAutoplayFLAG || _activeIndex !== activeIndex) return;
2202
2210
  that.show(o_loop ? '>' : normalizeIndex(activeIndex + 1));
2203
- });
2204
- }, opts.autoplay);
2211
+ }, opts.autoplay);
2212
+ });
2213
+
2205
2214
  }
2206
2215
 
2207
2216
  that.startAutoplay = function (interval) {
@@ -2395,7 +2404,7 @@ jQuery.Fotorama = function ($fotorama, opts) {
2395
2404
  if (data && !fullScreenApi.is() && !$videoPlaying) {
2396
2405
  cancelFullScreen();
2397
2406
  }
2398
- });
2407
+ }, false);
2399
2408
  }
2400
2409
 
2401
2410
  that.resize = function (options) {
@@ -2541,7 +2550,7 @@ jQuery.Fotorama = function ($fotorama, opts) {
2541
2550
  if (stageShaftTouchTail.flow) return;
2542
2551
 
2543
2552
  var x = e ? e.pageX : stageCursor.x,
2544
- pointerFLAG = !disableDirrection(getDirection(x)) && opts.click;
2553
+ pointerFLAG = e && !disableDirrection(getDirection(x)) && opts.click;
2545
2554
 
2546
2555
  if (stageCursor.p !== pointerFLAG
2547
2556
  && (o_fade || !opts.swipe)
@@ -2690,9 +2699,10 @@ jQuery.Fotorama = function ($fotorama, opts) {
2690
2699
  setOptions();
2691
2700
 
2692
2701
  if (!ready.ok) {
2702
+ var _startindex;
2693
2703
  // Only first time
2694
- if (opts.hash && location.hash) {
2695
- startIndex = getIndexFromHash(location.hash.replace(/^#/, ''), data, that.index === 0);
2704
+ if ((_startindex = opts.startindex) || opts.hash && location.hash) {
2705
+ startIndex = getIndexFromHash(_startindex || location.hash.replace(/^#/, ''), data, that.index === 0 || _startindex, _startindex);
2696
2706
  }
2697
2707
  activeIndex = repositionIndex = dirtyIndex = lastActiveIndex = startIndex = edgeIndex(startIndex) || 0;
2698
2708
  }
@@ -2785,6 +2795,7 @@ $.fn.fotorama = function (opts) {
2785
2795
  captions: true,
2786
2796
 
2787
2797
  hash: false,
2798
+ startindex: 0,
2788
2799
 
2789
2800
  autoplay: false,
2790
2801
  stopautoplayontouch: true,
@@ -2860,4 +2871,4 @@ return __p
2860
2871
  $(function () {
2861
2872
  $('.' + _fotoramaClass + ':not([data-auto="false"])').fotorama();
2862
2873
  });
2863
- })(window, document, jQuery);
2874
+ })(window, document, location, jQuery);
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Fotorama 4.3.3 | http://fotorama.io/license/
2
+ * Fotorama 4.3.4.1 | http://fotorama.io/license/
3
3
  */
4
4
  .fotorama__stage__shaft,
5
5
  .fotorama__stage__frame,
@@ -46,9 +46,9 @@
46
46
 
47
47
  .fotorama__img,
48
48
  .fotorama__oooo {
49
- position: absolute;
50
- top: 50%;
51
- left: 50%;
49
+ position: absolute !important;
50
+ top: 50% !important;
51
+ left: 50% !important;
52
52
  }
53
53
 
54
54
  .fotorama__img {
@@ -85,7 +85,6 @@
85
85
  .fotorama__wrap--css3 .fotorama__nav__shaft,
86
86
  .fotorama__wrap--css3 .fotorama__thumb-border {
87
87
  -webkit-transition-property: -webkit-transform, width;
88
- transition-property: -ms-transform, width;
89
88
  transition-property: transform, width;
90
89
  -webkit-transition-timing-function: cubic-bezier(0.1, 0, 0.25, 1);
91
90
  transition-timing-function: cubic-bezier(0.1, 0, 0.25, 1);
@@ -186,6 +185,7 @@
186
185
 
187
186
  .fotorama {
188
187
  min-width: 1px;
188
+ overflow: hidden;
189
189
  }
190
190
 
191
191
  .fotorama > * {
@@ -249,21 +249,6 @@
249
249
  opacity: 1 !important;
250
250
  }
251
251
 
252
- .fotorama__img {
253
- -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
254
- -webkit-filter: alpha(opacity=0);
255
- filter: alpha(opacity=0);
256
- opacity: 0;
257
- }
258
-
259
- .fotorama__loaded .fotorama__img,
260
- .fotorama__error .fotorama__img {
261
- -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
262
- -webkit-filter: alpha(opacity=100);
263
- filter: alpha(opacity=100);
264
- opacity: 1;
265
- }
266
-
267
252
  .fotorama__stage__frame {
268
253
  overflow: hidden;
269
254
  }
@@ -278,7 +263,6 @@
278
263
 
279
264
  .fotorama__wrap--fade .fotorama__stage__frame.fotorama__active {
280
265
  -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
281
- -webkit-filter: alpha(opacity=100);
282
266
  filter: alpha(opacity=100);
283
267
  opacity: 1;
284
268
  }
@@ -310,14 +294,22 @@
310
294
  .fotorama__wrap--video .fotorama__stage__frame--video .fotorama__img,
311
295
  .fotorama__wrap--video .fotorama__stage__frame--video .fotorama__html {
312
296
  -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
313
- -webkit-filter: alpha(opacity=0);
314
297
  filter: alpha(opacity=0);
315
298
  opacity: 0;
316
299
  }
317
300
 
318
301
  .fotorama__img {
302
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
303
+ filter: alpha(opacity=0);
304
+ opacity: 0;
319
305
  border: 0;
320
- overflow: hidden;
306
+ }
307
+
308
+ .fotorama__loaded .fotorama__img,
309
+ .fotorama__error .fotorama__img {
310
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
311
+ filter: alpha(opacity=100);
312
+ opacity: 1;
321
313
  }
322
314
 
323
315
  .fotorama__img--full {
@@ -436,7 +428,7 @@
436
428
  border-style: solid;
437
429
  border-color: #00afea;
438
430
  background-image: -webkit-linear-gradient(top left, rgba(255, 255, 255, 0.25), rgba(64, 64, 64, 0.1));
439
- background-image: linear-gradient(top left, rgba(255, 255, 255, 0.25), rgba(64, 64, 64, 0.1));
431
+ background-image: linear-gradient(to bottom right, rgba(255, 255, 255, 0.25), rgba(64, 64, 64, 0.1));
440
432
  }
441
433
 
442
434
  .fotorama__caption {
@@ -541,6 +533,12 @@
541
533
  z-index: 10;
542
534
  }
543
535
 
536
+ @-moz-document url-prefix() {
537
+ .fotorama__active {
538
+ box-shadow: 0 0 0 transparent;
539
+ }
540
+ }
541
+
544
542
  .fotorama__arr,
545
543
  .fotorama__fullscreen-icon,
546
544
  .fotorama__video-play,
@@ -554,7 +552,6 @@
554
552
  .fotorama__video-play,
555
553
  .fotorama__video-close {
556
554
  -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
557
- -webkit-filter: alpha(opacity=0);
558
555
  filter: alpha(opacity=0);
559
556
  opacity: 0;
560
557
  }
@@ -596,7 +593,6 @@
596
593
  pointer-events: none;
597
594
  cursor: default;
598
595
  *display: none;
599
- -webkit-filter: alpha(opacity=0);
600
596
  filter: alpha(opacity=0);
601
597
  opacity: .1;
602
598
  }
@@ -633,7 +629,6 @@
633
629
  margin-top: -16px;
634
630
  background-position: -64px -32px;
635
631
  -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)" !important;
636
- -webkit-filter: alpha(opacity=100) !important;
637
632
  filter: alpha(opacity=100) !important;
638
633
  opacity: 1 !important;
639
634
  }
@@ -650,7 +645,6 @@
650
645
  .fotorama__loaded .fotorama__video-play,
651
646
  .fotorama__error .fotorama__video-play {
652
647
  -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
653
- -webkit-filter: alpha(opacity=100);
654
648
  filter: alpha(opacity=100);
655
649
  opacity: 1;
656
650
  z-index: 11;
@@ -661,7 +655,6 @@
661
655
  .fotorama__wrap--video .fotorama__arr,
662
656
  .fotorama__wrap--video .fotorama__fullscreen-icon {
663
657
  -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)" !important;
664
- -webkit-filter: alpha(opacity=0) !important;
665
658
  filter: alpha(opacity=0) !important;
666
659
  opacity: 0 !important;
667
660
  }
@@ -684,7 +677,6 @@
684
677
 
685
678
  .fotorama__wrap--video .fotorama__stage .fotorama__video-play {
686
679
  -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)" !important;
687
- -webkit-filter: alpha(opacity=0) !important;
688
680
  filter: alpha(opacity=0) !important;
689
681
  opacity: 0 !important;
690
682
  z-index: -1;
@@ -694,7 +686,6 @@
694
686
  top: 0;
695
687
  right: 0;
696
688
  -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
697
- -webkit-filter: alpha(opacity=100);
698
689
  filter: alpha(opacity=100);
699
690
  opacity: 1;
700
691
  }
@@ -730,7 +721,7 @@
730
721
  .fotorama__stage:before,
731
722
  .fotorama__nav:before {
732
723
  background-image: -webkit-linear-gradient(transparent, rgba(0, 0, 0, 0.2) 25%, rgba(0, 0, 0, 0.3) 75%, transparent), -webkit-radial-gradient(0 50%, farthest-side, rgba(0, 0, 0, 0.4), transparent);
733
- background-image: linear-gradient(transparent, rgba(0, 0, 0, 0.2) 25%, rgba(0, 0, 0, 0.3) 75%, transparent), radial-gradient(0 50%, farthest-side, rgba(0, 0, 0, 0.4), transparent);
724
+ background-image: linear-gradient(transparent, rgba(0, 0, 0, 0.2) 25%, rgba(0, 0, 0, 0.3) 75%, transparent), radial-gradient(farthest-side at 0 50%, rgba(0, 0, 0, 0.4), transparent);
734
725
  background-position: 0 0, 0 0;
735
726
  left: -10px;
736
727
  }
@@ -743,7 +734,7 @@
743
734
  .fotorama__stage:after,
744
735
  .fotorama__nav:after {
745
736
  background-image: -webkit-linear-gradient(transparent, rgba(0, 0, 0, 0.2) 25%, rgba(0, 0, 0, 0.3) 75%, transparent), -webkit-radial-gradient(100% 50%, farthest-side, rgba(0, 0, 0, 0.4), transparent);
746
- background-image: linear-gradient(transparent, rgba(0, 0, 0, 0.2) 25%, rgba(0, 0, 0, 0.3) 75%, transparent), radial-gradient(100% 50%, farthest-side, rgba(0, 0, 0, 0.4), transparent);
737
+ background-image: linear-gradient(transparent, rgba(0, 0, 0, 0.2) 25%, rgba(0, 0, 0, 0.3) 75%, transparent), radial-gradient(farthest-side at 100% 50%, rgba(0, 0, 0, 0.4), transparent);
747
738
  background-position: 100% 0, 100% 0;
748
739
  right: -10px;
749
740
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fotoramajs
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.3.3
4
+ version: 4.3.4.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-08-27 00:00:00.000000000 Z
12
+ date: 2013-09-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sprockets
@@ -79,7 +79,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
79
79
  version: '0'
80
80
  segments:
81
81
  - 0
82
- hash: -3717274209991928291
82
+ hash: 4017034132781727142
83
83
  required_rubygems_version: !ruby/object:Gem::Requirement
84
84
  none: false
85
85
  requirements:
@@ -88,7 +88,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
88
88
  version: '0'
89
89
  segments:
90
90
  - 0
91
- hash: -3717274209991928291
91
+ hash: 4017034132781727142
92
92
  requirements: []
93
93
  rubyforge_project:
94
94
  rubygems_version: 1.8.23