fotoramajs 4.4.9 → 4.5.0
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 +4 -4
- data/fotoramajs.gemspec +9 -10
- data/lib/fotoramajs/version.rb +1 -1
- data/vendor/assets/images/fotorama.png +0 -0
- data/vendor/assets/images/fotorama@2x.png +0 -0
- data/vendor/assets/javascripts/fotorama.js +105 -50
- data/vendor/assets/stylesheets/fotorama.css.scss +169 -378
- metadata +4 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 494a6e2cafb5b6670f5b6afcc60fa2b610e84648
|
|
4
|
+
data.tar.gz: 559a3c9317f53f6d7ba02854b717689a8353a4b1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a17b66ee2b8823a3cc1148e822afb9a46a95ab0603329b3674990d3814181236f56dbb175390de077e005d59bda7c96ba32ed3cb5349dac64f913b8bf9c0754d
|
|
7
|
+
data.tar.gz: e0088ed8fb56ff6d5be39066eafec22dcfb7d0ebcaa1e9979628a1887b521dd50645ae177b4c59e78ccae16f929a6e84c010acae4b5d597d690522075dad992e
|
data/fotoramajs.gemspec
CHANGED
|
@@ -1,22 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
require './lib/fotoramajs/version'
|
|
1
|
+
require File.expand_path('../lib/fotoramajs/version', __FILE__)
|
|
4
2
|
|
|
5
3
|
Gem::Specification.new do |s|
|
|
4
|
+
s.platform = Gem::Platform::RUBY
|
|
6
5
|
s.name = 'fotoramajs'
|
|
7
6
|
s.version = Fotoramajs::VERSION
|
|
8
|
-
s.platform = Gem::Platform::RUBY
|
|
9
|
-
s.authors = ['Artem Polikarpov']
|
|
10
|
-
s.email = ['fotoramajs@gmail.com']
|
|
11
|
-
s.license = 'MIT'
|
|
12
|
-
s.homepage = 'http://fotorama.io/'
|
|
13
7
|
s.summary = 'Fotorama is a simple, stunning, powerful JavaScript gallery.'
|
|
14
8
|
s.description = 'Fotorama is a simple, stunning, powerful JavaScript ' +
|
|
15
9
|
'gallery. This is a gem, that allow you to simple install ' +
|
|
16
10
|
'and maintain Fotorama in Rails Assets Pipeline.'
|
|
17
11
|
|
|
18
|
-
s.add_dependency 'sprockets', '>= 2'
|
|
19
|
-
|
|
20
12
|
s.files = `git ls-files`.split("\n")
|
|
21
13
|
s.require_path = 'lib'
|
|
14
|
+
|
|
15
|
+
s.author = 'Artem Polikarpov'
|
|
16
|
+
s.email = 'fotoramajs@gmail.com'
|
|
17
|
+
s.homepage = 'http://fotorama.io/'
|
|
18
|
+
s.license = 'MIT'
|
|
19
|
+
|
|
20
|
+
s.add_dependency 'sprockets', '>= 2'
|
|
22
21
|
end
|
data/lib/fotoramajs/version.rb
CHANGED
|
Binary file
|
|
Binary file
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Fotorama 4.
|
|
2
|
+
* Fotorama 4.5.0 | http://fotorama.io/license/
|
|
3
3
|
*/
|
|
4
4
|
(function (window, document, location, $, undefined) {
|
|
5
5
|
"use strict";
|
|
@@ -848,7 +848,7 @@ var $WINDOW = $(window),
|
|
|
848
848
|
|
|
849
849
|
ADD_EVENT_LISTENER = 'addEventListener',
|
|
850
850
|
|
|
851
|
-
MS_POINTER =
|
|
851
|
+
MS_POINTER = navigator.msPointerEnabled,
|
|
852
852
|
|
|
853
853
|
WHEEL = "onwheel" in document.createElement("div") ? "wheel" : document.onmousewheel !== undefined ? "mousewheel" : "DOMMouseScroll",
|
|
854
854
|
|
|
@@ -909,6 +909,10 @@ function numberFromPercent (value) {
|
|
|
909
909
|
return /%$/.test(value) && numberFromMeasure(value, '%');
|
|
910
910
|
}
|
|
911
911
|
|
|
912
|
+
function numberFromWhatever (value, whole) {
|
|
913
|
+
return numberFromPercent(value) / 100 * whole || numberFromMeasure(value);
|
|
914
|
+
}
|
|
915
|
+
|
|
912
916
|
function measureIsValid (value) {
|
|
913
917
|
return (!!numberFromMeasure(value) || !!numberFromMeasure(value, '%')) && value;
|
|
914
918
|
}
|
|
@@ -1000,7 +1004,7 @@ function edgeResistance (pos, edge) {
|
|
|
1000
1004
|
}
|
|
1001
1005
|
|
|
1002
1006
|
function getProtocol () {
|
|
1003
|
-
getProtocol.p = getProtocol.p || (location.protocol === 'https
|
|
1007
|
+
getProtocol.p = getProtocol.p || (location.protocol === 'https:' ? 'https://' : 'http://');
|
|
1004
1008
|
return getProtocol.p;
|
|
1005
1009
|
}
|
|
1006
1010
|
|
|
@@ -1212,7 +1216,7 @@ function fit ($el, measuresToFit, method) {
|
|
|
1212
1216
|
w: measuresToFit.w,
|
|
1213
1217
|
h: measuresToFit.h,
|
|
1214
1218
|
m: method
|
|
1215
|
-
}
|
|
1219
|
+
};
|
|
1216
1220
|
}
|
|
1217
1221
|
|
|
1218
1222
|
return true;
|
|
@@ -1402,18 +1406,18 @@ function fade ($el1, $el2, $frames, options, fadeStack, chain) {
|
|
|
1402
1406
|
},
|
|
1403
1407
|
time = options.time / (chain || 1);
|
|
1404
1408
|
|
|
1405
|
-
$frames
|
|
1406
|
-
.not($el1.addClass(fadeRearClass).removeClass(fadeFrontClass))
|
|
1407
|
-
.not($el2.addClass(fadeFrontClass).removeClass(fadeRearClass))
|
|
1408
|
-
.removeClass(fadeRearClass + ' ' + fadeFrontClass);
|
|
1409
|
+
$frames.removeClass(fadeRearClass + ' ' + fadeFrontClass);
|
|
1409
1410
|
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1411
|
+
$el1
|
|
1412
|
+
.stop()
|
|
1413
|
+
.addClass(fadeRearClass);
|
|
1414
|
+
$el2
|
|
1415
|
+
.stop()
|
|
1416
|
+
.addClass(fadeFrontClass);
|
|
1413
1417
|
|
|
1414
1418
|
crossfadeFLAG && _$el2 && $el1.fadeTo(0, 0);
|
|
1415
1419
|
|
|
1416
|
-
$el1.fadeTo(crossfadeFLAG ? time :
|
|
1420
|
+
$el1.fadeTo(crossfadeFLAG ? time : 0, 1, crossfadeFLAG && onEndFn);
|
|
1417
1421
|
$el2.fadeTo(time, 0, onEndFn);
|
|
1418
1422
|
|
|
1419
1423
|
(_$el1 && crossfadeFLAG) || _$el2 || onEndFn();
|
|
@@ -1456,14 +1460,14 @@ function touch ($el, options) {
|
|
|
1456
1460
|
|
|
1457
1461
|
touchFLAG = e.type === 'touchstart';
|
|
1458
1462
|
targetIsLinkFlag = $target.is('a, a *', el);
|
|
1463
|
+
controlTouch = tail.control;
|
|
1459
1464
|
|
|
1460
|
-
tolerance = (tail.noMove || tail.noSwipe) ? 16 : !tail.snap ? 4 : 0;
|
|
1465
|
+
tolerance = (tail.noMove || tail.noSwipe || controlTouch) ? 16 : !tail.snap ? 4 : 0;
|
|
1461
1466
|
|
|
1462
1467
|
extendEvent(e);
|
|
1463
1468
|
|
|
1464
1469
|
startEvent = lastEvent = e;
|
|
1465
1470
|
moveEventType = e.type.replace(/down|start/, 'move').replace(/Down/, 'Move');
|
|
1466
|
-
controlTouch = tail.control;
|
|
1467
1471
|
|
|
1468
1472
|
(options.onStart || noop).call(el, e, {control: controlTouch, $target: $target});
|
|
1469
1473
|
|
|
@@ -1597,7 +1601,7 @@ function moveOnTouch ($el, options) {
|
|
|
1597
1601
|
moved,
|
|
1598
1602
|
tracked;
|
|
1599
1603
|
|
|
1600
|
-
function startTracking (e) {
|
|
1604
|
+
function startTracking (e, noStop) {
|
|
1601
1605
|
tracked = true;
|
|
1602
1606
|
startCoo = coo = e._x;
|
|
1603
1607
|
startTime = e._now;
|
|
@@ -1606,7 +1610,7 @@ function moveOnTouch ($el, options) {
|
|
|
1606
1610
|
[startTime, startCoo]
|
|
1607
1611
|
];
|
|
1608
1612
|
|
|
1609
|
-
startElPos = moveElPos = tail.noMove ? 0 : stop($el, (options.getPos || noop)(), options._001);
|
|
1613
|
+
startElPos = moveElPos = tail.noMove || noStop ? 0 : stop($el, (options.getPos || noop)(), options._001);
|
|
1610
1614
|
|
|
1611
1615
|
(options.onStart || noop).call(el, e);
|
|
1612
1616
|
}
|
|
@@ -1627,12 +1631,11 @@ function moveOnTouch ($el, options) {
|
|
|
1627
1631
|
}
|
|
1628
1632
|
|
|
1629
1633
|
function onMove (e, result) {
|
|
1630
|
-
if (!tracked) {
|
|
1631
|
-
controlFLAG = false;
|
|
1632
|
-
startTracking(e);
|
|
1633
|
-
}
|
|
1634
|
-
|
|
1635
1634
|
if (!tail.noSwipe) {
|
|
1635
|
+
if (!tracked) {
|
|
1636
|
+
startTracking(e);
|
|
1637
|
+
}
|
|
1638
|
+
|
|
1636
1639
|
coo = e._x;
|
|
1637
1640
|
|
|
1638
1641
|
moveTrack.push([e._now, coo]);
|
|
@@ -1662,12 +1665,14 @@ function moveOnTouch ($el, options) {
|
|
|
1662
1665
|
|
|
1663
1666
|
function onEnd (result) {
|
|
1664
1667
|
////console.time('moveontouch.js onEnd');
|
|
1665
|
-
if (
|
|
1668
|
+
if (tail.noSwipe && result.moved) return;
|
|
1666
1669
|
|
|
1667
1670
|
if (!tracked) {
|
|
1668
|
-
startTracking(result.startEvent);
|
|
1671
|
+
startTracking(result.startEvent, true);
|
|
1669
1672
|
}
|
|
1670
1673
|
|
|
1674
|
+
//console.log('onEnd');
|
|
1675
|
+
|
|
1671
1676
|
result.touch || MS_POINTER || $el.removeClass(grabbingClass);
|
|
1672
1677
|
|
|
1673
1678
|
endTime = $.now();
|
|
@@ -1858,6 +1863,7 @@ jQuery.Fotorama = function ($fotorama, opts) {
|
|
|
1858
1863
|
o_thumbSide,
|
|
1859
1864
|
o_thumbSide2,
|
|
1860
1865
|
o_transitionDuration,
|
|
1866
|
+
o_transition,
|
|
1861
1867
|
o_shadows,
|
|
1862
1868
|
o_rtl,
|
|
1863
1869
|
lastOptions = {},
|
|
@@ -2008,7 +2014,7 @@ jQuery.Fotorama = function ($fotorama, opts) {
|
|
|
2008
2014
|
stageShaftTouchTail.noMove = _noMove || o_fade;
|
|
2009
2015
|
stageShaftTouchTail.noSwipe = _noMove || !opts.swipe;
|
|
2010
2016
|
|
|
2011
|
-
$stageShaft.toggleClass(grabClass, !stageShaftTouchTail.noMove && !stageShaftTouchTail.noSwipe);
|
|
2017
|
+
!o_transition && $stageShaft.toggleClass(grabClass, !stageShaftTouchTail.noMove && !stageShaftTouchTail.noSwipe);
|
|
2012
2018
|
MS_POINTER && $wrap.toggleClass(wrapPanYClass, !stageShaftTouchTail.noSwipe);
|
|
2013
2019
|
}
|
|
2014
2020
|
|
|
@@ -2153,8 +2159,9 @@ jQuery.Fotorama = function ($fotorama, opts) {
|
|
|
2153
2159
|
stageShaftTouchTail.snap = measures.w + opts.margin;
|
|
2154
2160
|
}
|
|
2155
2161
|
|
|
2156
|
-
function
|
|
2157
|
-
|
|
2162
|
+
function setNavShaftMinMax () {
|
|
2163
|
+
////console.log('setNavShaftMinMax', measures.nw);
|
|
2164
|
+
navShaftTouchTail.min = Math.min(0, measures.nw - $navShaft.width());
|
|
2158
2165
|
navShaftTouchTail.max = 0;
|
|
2159
2166
|
$navShaft.toggleClass(grabClass, !(navShaftTouchTail.noMove = navShaftTouchTail.min === navShaftTouchTail.max));
|
|
2160
2167
|
}
|
|
@@ -2413,12 +2420,10 @@ jQuery.Fotorama = function ($fotorama, opts) {
|
|
|
2413
2420
|
}
|
|
2414
2421
|
|
|
2415
2422
|
function thumbsDraw (pos, loadFLAG) {
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
2423
|
if (o_nav !== 'thumbs' || isNaN(pos)) return;
|
|
2419
2424
|
|
|
2420
2425
|
var leftLimit = -pos,
|
|
2421
|
-
rightLimit = -pos + measures.
|
|
2426
|
+
rightLimit = -pos + measures.nw;
|
|
2422
2427
|
|
|
2423
2428
|
$navThumbFrame.each(function () {
|
|
2424
2429
|
var $this = $(this),
|
|
@@ -2537,11 +2542,12 @@ jQuery.Fotorama = function ($fotorama, opts) {
|
|
|
2537
2542
|
}
|
|
2538
2543
|
|
|
2539
2544
|
function slideNavShaft (options) {
|
|
2545
|
+
//console.log('slideNavShaft');
|
|
2540
2546
|
var $guessNavFrame = data[options.guessIndex][navFrameKey];
|
|
2541
2547
|
if ($guessNavFrame) {
|
|
2542
2548
|
var overflowFLAG = navShaftTouchTail.min !== navShaftTouchTail.max,
|
|
2543
2549
|
activeNavFrameBounds = overflowFLAG && getNavFrameBounds(that.activeFrame[navFrameKey]),
|
|
2544
|
-
l = overflowFLAG && (options.keep && slideNavShaft.l ? slideNavShaft.l : minMaxLimit((options.coo || measures.
|
|
2550
|
+
l = overflowFLAG && (options.keep && slideNavShaft.l ? slideNavShaft.l : minMaxLimit((options.coo || measures.nw / 2) - getNavFrameBounds($guessNavFrame).c, activeNavFrameBounds.min, activeNavFrameBounds.max)),
|
|
2545
2551
|
pos = overflowFLAG && minMaxLimit(l, navShaftTouchTail.min, navShaftTouchTail.max),
|
|
2546
2552
|
time = options.time * .9;
|
|
2547
2553
|
|
|
@@ -2607,7 +2613,7 @@ jQuery.Fotorama = function ($fotorama, opts) {
|
|
|
2607
2613
|
detachFrames(STAGE_FRAME_KEY);
|
|
2608
2614
|
stageFramePosition(activeIndexes);
|
|
2609
2615
|
setStageShaftMinmaxAndSnap();
|
|
2610
|
-
|
|
2616
|
+
setNavShaftMinMax();
|
|
2611
2617
|
}
|
|
2612
2618
|
}
|
|
2613
2619
|
|
|
@@ -2649,6 +2655,11 @@ jQuery.Fotorama = function ($fotorama, opts) {
|
|
|
2649
2655
|
|
|
2650
2656
|
function onTouchEnd () {
|
|
2651
2657
|
////console.time('onTouchEnd');
|
|
2658
|
+
if (!opts.stopautoplayontouch) {
|
|
2659
|
+
releaseAutoplay();
|
|
2660
|
+
changeAutoplay();
|
|
2661
|
+
}
|
|
2662
|
+
|
|
2652
2663
|
onTouchEnd.t = setTimeout(function () {
|
|
2653
2664
|
touchedFLAG = 0;
|
|
2654
2665
|
}, TRANSITION_DURATION + TOUCH_TIMEOUT);
|
|
@@ -2708,7 +2719,7 @@ jQuery.Fotorama = function ($fotorama, opts) {
|
|
|
2708
2719
|
};
|
|
2709
2720
|
|
|
2710
2721
|
that.show = function (options) {
|
|
2711
|
-
|
|
2722
|
+
//console.log('that.show');
|
|
2712
2723
|
////console.time('that.show prepare');
|
|
2713
2724
|
var index;
|
|
2714
2725
|
|
|
@@ -2763,17 +2774,34 @@ jQuery.Fotorama = function ($fotorama, opts) {
|
|
|
2763
2774
|
//}, 0);
|
|
2764
2775
|
|
|
2765
2776
|
////console.time('bind onEnd');
|
|
2777
|
+
|
|
2778
|
+
pausedAutoplayFLAG = true;
|
|
2779
|
+
|
|
2766
2780
|
var onEnd = that.show.onEnd = function (skipReposition) {
|
|
2767
2781
|
if (onEnd.ok) return;
|
|
2768
2782
|
onEnd.ok = true;
|
|
2769
|
-
updateFotoramaState();
|
|
2770
|
-
loadImg(activeIndexes, 'stage');
|
|
2771
2783
|
|
|
2772
2784
|
skipReposition || stageShaftReposition(true);
|
|
2773
2785
|
|
|
2774
|
-
options.reset
|
|
2775
|
-
|
|
2776
|
-
|
|
2786
|
+
//console.log('options.reset', options.reset);
|
|
2787
|
+
|
|
2788
|
+
if (!options.reset) {
|
|
2789
|
+
triggerEvent('showend', {
|
|
2790
|
+
user: options.user
|
|
2791
|
+
});
|
|
2792
|
+
|
|
2793
|
+
//console.log('o_transition', o_transition);
|
|
2794
|
+
|
|
2795
|
+
if (!skipReposition && o_transition && o_transition !== opts.transition) {
|
|
2796
|
+
//console.log('set transition back to: ' + o_transition);
|
|
2797
|
+
that.setOptions({transition: o_transition});
|
|
2798
|
+
o_transition = false;
|
|
2799
|
+
return;
|
|
2800
|
+
}
|
|
2801
|
+
}
|
|
2802
|
+
|
|
2803
|
+
updateFotoramaState();
|
|
2804
|
+
loadImg(activeIndexes, 'stage');
|
|
2777
2805
|
|
|
2778
2806
|
updateTouchTails('go', false);
|
|
2779
2807
|
stageWheelUpdate();
|
|
@@ -2816,7 +2844,7 @@ jQuery.Fotorama = function ($fotorama, opts) {
|
|
|
2816
2844
|
|
|
2817
2845
|
////console.time('slideNavShaft');
|
|
2818
2846
|
var guessIndex = limitIndex(activeIndex + minMaxLimit(dirtyIndex - lastActiveIndex, -1, 1));
|
|
2819
|
-
slideNavShaft({time: time, coo: guessIndex !== activeIndex && options.coo, guessIndex: typeof options.coo !== 'undefined' ? guessIndex : activeIndex});
|
|
2847
|
+
slideNavShaft({time: time, coo: guessIndex !== activeIndex && options.coo, guessIndex: typeof options.coo !== 'undefined' ? guessIndex : activeIndex, keep: options.reset});
|
|
2820
2848
|
////console.timeEnd('slideNavShaft');
|
|
2821
2849
|
|
|
2822
2850
|
////console.time('slideThumbBorder');
|
|
@@ -2936,10 +2964,11 @@ jQuery.Fotorama = function ($fotorama, opts) {
|
|
|
2936
2964
|
.css({width: width, minWidth: measures.minwidth, maxWidth: measures.maxwidth});
|
|
2937
2965
|
|
|
2938
2966
|
width = measures.W = measures.w = $wrap.width();
|
|
2967
|
+
measures.nw = o_nav && numberFromWhatever(opts.navwidth, width) || width;
|
|
2939
2968
|
|
|
2940
2969
|
if (opts.glimpse) {
|
|
2941
2970
|
// Glimpse
|
|
2942
|
-
measures.w -= Math.round((
|
|
2971
|
+
measures.w -= Math.round((numberFromWhatever(opts.glimpse, width) || 0) * 2);
|
|
2943
2972
|
}
|
|
2944
2973
|
|
|
2945
2974
|
$stageShaft.css({width: measures.w, marginLeft: (measures.W - measures.w) / 2});
|
|
@@ -2947,15 +2976,13 @@ jQuery.Fotorama = function ($fotorama, opts) {
|
|
|
2947
2976
|
////console.log('measures.W', measures.W);
|
|
2948
2977
|
////console.log('measures.w', measures.w);
|
|
2949
2978
|
|
|
2950
|
-
height =
|
|
2979
|
+
height = numberFromWhatever(height, windowHeight);
|
|
2951
2980
|
|
|
2952
2981
|
height = height || (ratio && width / ratio);
|
|
2953
2982
|
|
|
2954
2983
|
if (height) {
|
|
2955
2984
|
width = Math.round(width);
|
|
2956
|
-
height = measures.h = Math.round(minMaxLimit(height,
|
|
2957
|
-
|
|
2958
|
-
stageShaftReposition();
|
|
2985
|
+
height = measures.h = Math.round(minMaxLimit(height, numberFromWhatever(measures.minheight, windowHeight), numberFromWhatever(measures.maxheight, windowHeight)));
|
|
2959
2986
|
|
|
2960
2987
|
$stage
|
|
2961
2988
|
.stop()
|
|
@@ -2963,15 +2990,19 @@ jQuery.Fotorama = function ($fotorama, opts) {
|
|
|
2963
2990
|
$wrap.removeClass(wrapOnlyActiveClass);
|
|
2964
2991
|
});
|
|
2965
2992
|
|
|
2993
|
+
stageShaftReposition();
|
|
2994
|
+
|
|
2966
2995
|
if (o_nav) {
|
|
2967
2996
|
$nav
|
|
2968
2997
|
.stop()
|
|
2969
|
-
.animate({width:
|
|
2998
|
+
.animate({width: measures.nw}, time);
|
|
2970
2999
|
|
|
2971
3000
|
slideNavShaft({guessIndex: activeIndex, time: time, keep: true});
|
|
2972
3001
|
if (o_navThumbs && frameAppend.nav) slideThumbBorder(time);
|
|
2973
3002
|
}
|
|
3003
|
+
|
|
2974
3004
|
measuresSetFLAG = setFLAG || true;
|
|
3005
|
+
|
|
2975
3006
|
ready();
|
|
2976
3007
|
}
|
|
2977
3008
|
}
|
|
@@ -3087,6 +3118,23 @@ jQuery.Fotorama = function ($fotorama, opts) {
|
|
|
3087
3118
|
|
|
3088
3119
|
$stage.on('mousemove', stageCursor);
|
|
3089
3120
|
|
|
3121
|
+
function clickToShow (showOptions) {
|
|
3122
|
+
clearTimeout(clickToShow.t);
|
|
3123
|
+
|
|
3124
|
+
if (opts.clicktransition && opts.clicktransition !== opts.transition) {
|
|
3125
|
+
//console.log('change transition to: ' + opts.clicktransition);
|
|
3126
|
+
// save original transition for later
|
|
3127
|
+
o_transition = opts.transition;
|
|
3128
|
+
that.setOptions({transition: opts.clicktransition});
|
|
3129
|
+
|
|
3130
|
+
clickToShow.t = setTimeout(function () {
|
|
3131
|
+
that.show(showOptions);
|
|
3132
|
+
}, 10);
|
|
3133
|
+
} else {
|
|
3134
|
+
that.show(showOptions);
|
|
3135
|
+
}
|
|
3136
|
+
}
|
|
3137
|
+
|
|
3090
3138
|
function onStageTap (e, toggleControlsFLAG) {
|
|
3091
3139
|
////console.time('onStageTap');
|
|
3092
3140
|
var target = e.target,
|
|
@@ -3102,7 +3150,8 @@ jQuery.Fotorama = function ($fotorama, opts) {
|
|
|
3102
3150
|
if (toggleControlsFLAG) {
|
|
3103
3151
|
toggleControlsClass();
|
|
3104
3152
|
} else if (opts.click) {
|
|
3105
|
-
|
|
3153
|
+
|
|
3154
|
+
clickToShow({index: e.shiftKey || getDirectionSign(getDirection(e._x)), slow: e.altKey, user: true});
|
|
3106
3155
|
}
|
|
3107
3156
|
}
|
|
3108
3157
|
////console.timeEnd('onStageTap');
|
|
@@ -3122,9 +3171,11 @@ jQuery.Fotorama = function ($fotorama, opts) {
|
|
|
3122
3171
|
////console.time('stageShaftTouchTail.onEnd');
|
|
3123
3172
|
setShadow($stage);
|
|
3124
3173
|
|
|
3174
|
+
////console.log('result', result);
|
|
3175
|
+
|
|
3125
3176
|
var toggleControlsFLAG = (MS_POINTER && !hoverFLAG || result.touch) && opts.arrows;
|
|
3126
3177
|
|
|
3127
|
-
if (result.moved || (toggleControlsFLAG && result.pos !== result.newPos)) {
|
|
3178
|
+
if (result.moved || (toggleControlsFLAG && result.pos !== result.newPos && !result.control)) {
|
|
3128
3179
|
var index = getIndexByPos(result.newPos, measures.w, opts.margin, repositionIndex);
|
|
3129
3180
|
that.show({
|
|
3130
3181
|
index: index,
|
|
@@ -3132,7 +3183,7 @@ jQuery.Fotorama = function ($fotorama, opts) {
|
|
|
3132
3183
|
overPos: result.overPos,
|
|
3133
3184
|
user: true
|
|
3134
3185
|
});
|
|
3135
|
-
} else if (!result.aborted) {
|
|
3186
|
+
} else if (!result.aborted && !result.control) {
|
|
3136
3187
|
onStageTap(result.startEvent, toggleControlsFLAG);
|
|
3137
3188
|
}
|
|
3138
3189
|
////console.timeEnd('stageShaftTouchTail.onEnd');
|
|
@@ -3155,6 +3206,7 @@ jQuery.Fotorama = function ($fotorama, opts) {
|
|
|
3155
3206
|
},
|
|
3156
3207
|
onTouchEnd: onTouchEnd,
|
|
3157
3208
|
onEnd: function (result) {
|
|
3209
|
+
|
|
3158
3210
|
function onEnd () {
|
|
3159
3211
|
slideNavShaft.l = result.newPos;
|
|
3160
3212
|
releaseAutoplay();
|
|
@@ -3166,6 +3218,7 @@ jQuery.Fotorama = function ($fotorama, opts) {
|
|
|
3166
3218
|
var target = result.$target.closest('.' + navFrameClass, $navShaft)[0];
|
|
3167
3219
|
target && onNavFrameClick.call(target, result.startEvent);
|
|
3168
3220
|
} else if (result.pos !== result.newPos) {
|
|
3221
|
+
pausedAutoplayFLAG = true;
|
|
3169
3222
|
slide($navShaft, {
|
|
3170
3223
|
time: result.time,
|
|
3171
3224
|
pos: result.newPos,
|
|
@@ -3227,12 +3280,12 @@ jQuery.Fotorama = function ($fotorama, opts) {
|
|
|
3227
3280
|
|
|
3228
3281
|
function onNavFrameClick (e, time) {
|
|
3229
3282
|
var index = $(this).data().eq;
|
|
3230
|
-
|
|
3283
|
+
clickToShow({index: index, slow: e.altKey, user: true, coo: e._x - $nav.offset().left, time: time});
|
|
3231
3284
|
}
|
|
3232
3285
|
|
|
3233
3286
|
smartClick($arrs, function (e) {
|
|
3234
3287
|
stopEvent(e);
|
|
3235
|
-
|
|
3288
|
+
clickToShow({index: $arrs.index(this) ? '>' : '<', slow: e.altKey, user: true});
|
|
3236
3289
|
}, {
|
|
3237
3290
|
onStart: function () {
|
|
3238
3291
|
onTouchStart();
|
|
@@ -3346,6 +3399,7 @@ $.fn.fotorama = function (opts) {
|
|
|
3346
3399
|
// navigation, thumbs
|
|
3347
3400
|
nav: 'dots', // 'thumbs' || false
|
|
3348
3401
|
navposition: 'bottom', // 'top'
|
|
3402
|
+
navwidth: null,
|
|
3349
3403
|
thumbwidth: THUMB_SIZE,
|
|
3350
3404
|
thumbheight: THUMB_SIZE,
|
|
3351
3405
|
thumbmargin: MARGIN,
|
|
@@ -3356,6 +3410,7 @@ $.fn.fotorama = function (opts) {
|
|
|
3356
3410
|
fit: 'contain', // 'cover' || 'scaledown' || 'none'
|
|
3357
3411
|
|
|
3358
3412
|
transition: 'slide', // 'crossfade' || 'dissolve'
|
|
3413
|
+
clicktransition: null,
|
|
3359
3414
|
transitionduration: TRANSITION_DURATION,
|
|
3360
3415
|
|
|
3361
3416
|
captions: true,
|
|
@@ -3447,4 +3502,4 @@ return __p
|
|
|
3447
3502
|
$(function () {
|
|
3448
3503
|
$('.' + _fotoramaClass + ':not([data-auto="false"])').fotorama();
|
|
3449
3504
|
});
|
|
3450
|
-
})(window, document, location,
|
|
3505
|
+
})(window, document, location, typeof jQuery !== 'undefined' && jQuery);
|