fotoramajs 4.4.7 → 4.4.8

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 888bdc17c3f4261ac1b4a447e43a9de92eab4f01
4
- data.tar.gz: 085d95b6aa7e99c7a947dbc502fe5d441b93c85d
3
+ metadata.gz: 67d438259c7e801ec727ac663d8daee2d0f9354e
4
+ data.tar.gz: e53d3c6fcf173380ccf855b98482fdf2a5cca8f6
5
5
  SHA512:
6
- metadata.gz: ac505aadf7e0f94ea4cdf187e523eb32d62482c77882c05ef28696e06b25820fe4eacb62c48ee61c574aaebe3f4006b652c1ba2801ed0b7347f0007cb818ace1
7
- data.tar.gz: 2cf48602c09c5c751c347fb3cd4e310266ed859286a97516452fe2f1c2e0d448966913118020f94966e0c10049315b2daae377508e3e7c1a703748e63989f1ff
6
+ metadata.gz: 5ef51eae85f58f5bb76accdfe7810d2ee5aa502f982934ccd65a1b9befb185af974001bbac8b7d975dc11f89dbf4f4fdb266c169c73ecc1a94567976d1aaa459
7
+ data.tar.gz: 736fc744dc6fa65063f0a2ec72c9022de6c56b84b1fa44c7cdd69ac835a1ad105553e8c33862ae2e7c083d57b0ab5680099bf3fe3d0a956b7b0575d53aac17d4
@@ -1,3 +1,3 @@
1
1
  module Fotoramajs
2
- VERSION = "4.4.7"
2
+ VERSION = "4.4.8"
3
3
  end
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Fotorama 4.4.7 | http://fotorama.io/license/
2
+ * Fotorama 4.4.8 | http://fotorama.io/license/
3
3
  */
4
4
  (function (window, document, location, $, undefined) {
5
5
  "use strict";
@@ -427,6 +427,11 @@ var Spinner,
427
427
  rotate: 15, // The rotation offset
428
428
  color: 'rgba(128, 128, 128, .75)',
429
429
  hwaccel: true
430
+ },
431
+ spinnerOverride = {
432
+ top: 'auto',
433
+ left: 'auto',
434
+ className: ''
430
435
  };
431
436
 
432
437
  (function(root, factory) {
@@ -1262,12 +1267,12 @@ function smartClick ($el, fn, _options) {
1262
1267
  (_options.onStart || noop).call(this, e);
1263
1268
  },
1264
1269
  onMove: _options.onMove || noop,
1270
+ onTouchEnd: _options.onTouchEnd || noop,
1265
1271
  onEnd: function (result) {
1266
1272
  if (result.moved || _options.tail.checked) return;
1267
1273
  fn.call(this, startEvent);
1268
1274
  }
1269
1275
  }), _options.tail);
1270
-
1271
1276
  });
1272
1277
  }
1273
1278
 
@@ -1461,6 +1466,7 @@ function touch ($el, options) {
1461
1466
  || moveEventType !== e.type
1462
1467
  || !touchEnabledFLAG) {
1463
1468
  touchEnabledFLAG && onEnd();
1469
+ (options.onTouchEnd || noop)();
1464
1470
  return;
1465
1471
  }
1466
1472
 
@@ -1487,6 +1493,9 @@ function touch ($el, options) {
1487
1493
 
1488
1494
  function onEnd (e) {
1489
1495
  ////console.time('touch.js onEnd');
1496
+
1497
+ (options.onTouchEnd || noop)();
1498
+
1490
1499
  var _touchEnabledFLAG = touchEnabledFLAG;
1491
1500
  tail.control = touchEnabledFLAG = false;
1492
1501
 
@@ -1710,6 +1719,7 @@ function moveOnTouch ($el, options) {
1710
1719
  tail = $.extend(touch(options.$wrap, {
1711
1720
  onStart: onStart,
1712
1721
  onMove: onMove,
1722
+ onTouchEnd: options.onTouchEnd,
1713
1723
  onEnd: onEnd,
1714
1724
  select: options.select,
1715
1725
  control: options.control
@@ -1871,8 +1881,6 @@ jQuery.Fotorama = function ($fotorama, opts) {
1871
1881
  toDeactivate[NAV_DOT_FRAME_KEY] = [];
1872
1882
  toDetach[STAGE_FRAME_KEY] = {};
1873
1883
 
1874
- that.prevent = {};
1875
-
1876
1884
  $wrap.addClass(CSS3 ? wrapCss3Class : wrapCss2Class);
1877
1885
 
1878
1886
  fotoramaData.fotorama = this;
@@ -2021,7 +2029,8 @@ jQuery.Fotorama = function ($fotorama, opts) {
2021
2029
  $arrs.hide();
2022
2030
  }
2023
2031
 
2024
- spinner = new Spinner($.extend(spinnerDefaults, opts.spinner));
2032
+ spinnerStop();
2033
+ spinner = new Spinner($.extend(spinnerDefaults, opts.spinner, spinnerOverride, {direction: o_rtl ? -1 : 1}));
2025
2034
 
2026
2035
  arrsUpdate();
2027
2036
  stageWheelUpdate();
@@ -2092,8 +2101,6 @@ jQuery.Fotorama = function ($fotorama, opts) {
2092
2101
  o_shadows = opts.shadows && !SLOW;
2093
2102
  classes[addOrRemove(!o_shadows)].push(wrapNoShadowsClass);
2094
2103
 
2095
- spinnerStop();
2096
-
2097
2104
  $wrap
2098
2105
  .addClass(classes.add.join(' '))
2099
2106
  .removeClass(classes.remove.join(' '));
@@ -2222,7 +2229,7 @@ jQuery.Fotorama = function ($fotorama, opts) {
2222
2229
 
2223
2230
  frameData.state = 'error';
2224
2231
 
2225
- if (size > 1 && !dataFrame.html && !dataFrame.deleted && !dataFrame.video && !fullFLAG) {
2232
+ if (size > 1 && data[index] === dataFrame && !dataFrame.html && !dataFrame.deleted && !dataFrame.video && !fullFLAG) {
2226
2233
  dataFrame.deleted = true;
2227
2234
  that.splice(index, 1);
2228
2235
  }
@@ -2307,7 +2314,7 @@ jQuery.Fotorama = function ($fotorama, opts) {
2307
2314
 
2308
2315
  function spinnerStop () {
2309
2316
  $spinner.detach();
2310
- spinner.stop();
2317
+ spinner && spinner.stop();
2311
2318
  }
2312
2319
 
2313
2320
  function updateFotoramaState () {
@@ -2606,13 +2613,8 @@ jQuery.Fotorama = function ($fotorama, opts) {
2606
2613
  });
2607
2614
  }
2608
2615
 
2609
- function triggerEvent (event, extra, fn) {
2616
+ function triggerEvent (event, extra) {
2610
2617
  $fotorama.trigger(_fotoramaClass + ':' + event, [that, extra]);
2611
- if (!that.prevent[event]) {
2612
- (fn || noop)();
2613
- } else {
2614
- delete that.prevent[event];
2615
- }
2616
2618
  }
2617
2619
 
2618
2620
  function onTouchStart () {
@@ -3077,13 +3079,11 @@ jQuery.Fotorama = function ($fotorama, opts) {
3077
3079
  } else if ($videoPlaying) {
3078
3080
  target === videoClose && unloadVideo($videoPlaying, true, true);
3079
3081
  } else {
3080
- triggerEvent('stagetap', undefined, function () {
3081
- if (toggleControlsFLAG) {
3082
- toggleControlsClass();
3083
- } else if (opts.click) {
3084
- that.show({index: e.shiftKey || getDirectionSign(getDirection(e._x)), slow: e.altKey, user: true});
3085
- }
3086
- });
3082
+ if (toggleControlsFLAG) {
3083
+ toggleControlsClass();
3084
+ } else if (opts.click) {
3085
+ that.show({index: e.shiftKey || getDirectionSign(getDirection(e._x)), slow: e.altKey, user: true});
3086
+ }
3087
3087
  }
3088
3088
  ////console.timeEnd('onStageTap');
3089
3089
  }
@@ -3097,12 +3097,11 @@ jQuery.Fotorama = function ($fotorama, opts) {
3097
3097
  onMove: function (e, result) {
3098
3098
  setShadow($stage, result.edge);
3099
3099
  },
3100
+ onTouchEnd: onTouchEnd,
3100
3101
  onEnd: function (result) {
3101
3102
  ////console.time('stageShaftTouchTail.onEnd');
3102
3103
  setShadow($stage);
3103
3104
 
3104
- onTouchEnd();
3105
-
3106
3105
  var toggleControlsFLAG = (MS_POINTER && !hoverFLAG || result.touch) && opts.arrows;
3107
3106
 
3108
3107
  if (result.moved || (toggleControlsFLAG && result.pos !== result.newPos)) {
@@ -3134,9 +3133,8 @@ jQuery.Fotorama = function ($fotorama, opts) {
3134
3133
  onMove: function (e, result) {
3135
3134
  setShadow($nav, result.edge);
3136
3135
  },
3136
+ onTouchEnd: onTouchEnd,
3137
3137
  onEnd: function (result) {
3138
- onTouchEnd();
3139
-
3140
3138
  function onEnd () {
3141
3139
  slideNavShaft.l = result.newPos;
3142
3140
  releaseAutoplay();
@@ -3214,17 +3212,13 @@ jQuery.Fotorama = function ($fotorama, opts) {
3214
3212
 
3215
3213
  smartClick($arrs, function (e) {
3216
3214
  stopEvent(e);
3217
- if ($videoPlaying) {
3218
- unloadVideo($videoPlaying, true, true);
3219
- } else {
3220
- onTouchEnd();
3221
- that.show({index: $arrs.index(this) ? '>' : '<', slow: e.altKey, user: true});
3222
- }
3215
+ that.show({index: $arrs.index(this) ? '>' : '<', slow: e.altKey, user: true});
3223
3216
  }, {
3224
3217
  onStart: function () {
3225
3218
  onTouchStart();
3226
3219
  stageShaftTouchTail.control = true;
3227
3220
  },
3221
+ onTouchEnd: onTouchEnd,
3228
3222
  tail: stageShaftTouchTail
3229
3223
  });
3230
3224
 
@@ -3366,7 +3360,8 @@ $.fn.fotorama = function (opts) {
3366
3360
 
3367
3361
  direction: 'ltr', // 'rtl'
3368
3362
 
3369
- shadows: true
3363
+ shadows: true,
3364
+ spinner: null
3370
3365
  },
3371
3366
  window.fotoramaDefaults,
3372
3367
  opts,
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Fotorama 4.4.7 | http://fotorama.io/license/
2
+ * Fotorama 4.4.8 | http://fotorama.io/license/
3
3
  */
4
4
  .fotorama__stage__shaft,
5
5
  .fotorama__stage__frame,
@@ -71,10 +71,11 @@
71
71
  transform: translate3d(0, 0, 0);
72
72
  }
73
73
 
74
+ .fotorama__wrap--css3 .fotorama__spinner,
74
75
  .fotorama__wrap--css3 .fotorama__stage,
75
76
  .fotorama__wrap--css3 .fotorama__nav,
76
77
  .fotorama__wrap--css3 .fotorama__stage__frame,
77
- .fotorama__wrap--css3 .fotorama__stage__frame .fotorama__img,
78
+ .fotorama__wrap--css3 .fotorama__stage .fotorama__img,
78
79
  .fotorama__wrap--css3 .fotorama__html,
79
80
  .fotorama__wrap--css3 .fotorama__caption,
80
81
  .fotorama__stage:before,
@@ -471,6 +472,37 @@
471
472
  padding: 5px 10px;
472
473
  }
473
474
 
475
+ @-webkit-keyframes spinner {
476
+ 0% {
477
+ -webkit-transform: rotate(0);
478
+ transform: rotate(0);
479
+ }
480
+
481
+ 100% {
482
+ -webkit-transform: rotate(360deg);
483
+ transform: rotate(360deg);
484
+ }
485
+ }
486
+
487
+ @keyframes spinner {
488
+ 0% {
489
+ -webkit-transform: rotate(0);
490
+ -ms-transform: rotate(0);
491
+ transform: rotate(0);
492
+ }
493
+
494
+ 100% {
495
+ -webkit-transform: rotate(360deg);
496
+ -ms-transform: rotate(360deg);
497
+ transform: rotate(360deg);
498
+ }
499
+ }
500
+
501
+ .fotorama__wrap--css3 .fotorama__spinner {
502
+ -webkit-animation: spinner 24s infinite linear;
503
+ animation: spinner 24s infinite linear;
504
+ }
505
+
474
506
  .fotorama__wrap--css3 .fotorama__stage .fotorama__img,
475
507
  .fotorama__wrap--css3 .fotorama__html,
476
508
  .fotorama__wrap--css3 .fotorama__caption {
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fotoramajs
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.4.7
4
+ version: 4.4.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Artem Polikarpov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-11-05 00:00:00.000000000 Z
11
+ date: 2013-11-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sprockets