gent_styleguide 2.9.2 → 2.12.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.
- package/.codeclimate.yml +51 -14
- package/CHANGELOG.md +15 -1
- package/CONTRIBUTING.md +8 -1
- package/README.md +23 -6
- package/build/styleguide/js/base-min.js +68 -1
- package/build/styleguide/js/breadcrumbs.binding-min.js +13 -1
- package/build/styleguide/js/breadcrumbs.functions-min.js +131 -1
- package/build/styleguide/js/button-drop-min.js +38 -1
- package/build/styleguide/js/button-drop.binding-min.js +13 -1
- package/build/styleguide/js/button-drop.functions-min.js +48 -1
- package/build/styleguide/js/gallery.binding-min.js +12 -1
- package/build/styleguide/js/gallery.functions-min.js +29 -1
- package/build/styleguide/js/hamburger-menu.binding-min.js +17 -1
- package/build/styleguide/js/hamburger-menu.functions-min.js +166 -1
- package/build/styleguide/js/header.binding-min.js +18 -1
- package/build/styleguide/js/header.functions-min.js +73 -1
- package/build/styleguide/js/input-date.binding-min.js +8 -1
- package/build/styleguide/js/input-date.functions-min.js +27 -1
- package/build/styleguide/js/input-multiselect-chosen.binding-min.js +31 -1
- package/build/styleguide/js/input-multiselect-chosen.functions-min.js +24 -1
- package/build/styleguide/js/teaser-collection.binding-min.js +14 -1
- package/build/styleguide/sass/00-settings/_vars.scss +2 -3
- package/build/styleguide/sass/01-mixins/grid/_default_classes.scss +8 -6
- package/build/styleguide/sass/01-mixins/grid/_mixins.scss +22 -20
- package/build/styleguide/sass/11-base/forms/_forms.scss +3 -0
- package/build/styleguide/sass/11-base/grid/_grid.scss +2 -2
- package/build/styleguide/sass/21-atoms/fieldset/_fieldset.scss +1 -1
- package/build/styleguide/sass/21-atoms/inputs/input-multiselect-chosen/_input-multiselect-chosen.scss +1 -1
- package/build/styleguide/sass/21-atoms/tag/_tag.scss +0 -5
- package/build/styleguide/sass/31-molecules/building-blocks/breadcrumbs/_breadcrumbs.scss +33 -37
- package/build/styleguide/sass/31-molecules/building-blocks/hamburger-menu/_hamburger-menu.scss +1 -1
- package/build/styleguide/sass/31-molecules/status-message/_status-message.scss +1 -0
- package/build/styleguide/sass/41-organisms/header/_header.scss +2 -2
- package/build/styleguide/sass/main_cli.scss +12 -11
- package/nbproject/private/private.properties +1 -0
- package/nbproject/private/private.xml +8 -0
- package/nbproject/project.properties +5 -0
- package/nbproject/project.xml +9 -0
- package/package.json +7 -9
- package/.github/ISSUE_TEMPLATE.md +0 -32
- package/.github/PULL_REQUEST_TEMPLATE.md +0 -30
- package/.mdl.style.rb +0 -9
- package/.mdlrc +0 -1
- package/.travis.yml +0 -27
- package/build/styleguide/vendor/chosen-js/README.md +0 -47
- package/build/styleguide/vendor/chosen-js/chosen-sprite.png +0 -0
- package/build/styleguide/vendor/chosen-js/chosen-sprite@2x.png +0 -0
- package/build/styleguide/vendor/chosen-js/chosen.css +0 -490
- package/build/styleguide/vendor/chosen-js/chosen.jquery.js +0 -1349
- package/build/styleguide/vendor/chosen-js/chosen.jquery.min.js +0 -3
- package/build/styleguide/vendor/chosen-js/chosen.min.css +0 -11
- package/build/styleguide/vendor/chosen-js/chosen.proto.js +0 -1389
- package/build/styleguide/vendor/chosen-js/chosen.proto.min.js +0 -3
- package/build/styleguide/vendor/jquery/AUTHORS.txt +0 -301
- package/build/styleguide/vendor/jquery/LICENSE.txt +0 -36
- package/build/styleguide/vendor/jquery/README.md +0 -67
- package/build/styleguide/vendor/jquery/dist/core.js +0 -476
- package/build/styleguide/vendor/jquery/dist/jquery.js +0 -10253
- package/build/styleguide/vendor/jquery/dist/jquery.min.js +0 -4
- package/build/styleguide/vendor/jquery/dist/jquery.min.map +0 -1
- package/build/styleguide/vendor/jquery/dist/jquery.slim.js +0 -8160
- package/build/styleguide/vendor/jquery/dist/jquery.slim.min.js +0 -4
- package/build/styleguide/vendor/jquery/dist/jquery.slim.min.map +0 -1
- package/build/styleguide/vendor/jquery/external/sizzle/LICENSE.txt +0 -36
- package/build/styleguide/vendor/jquery/external/sizzle/dist/sizzle.js +0 -2272
- package/build/styleguide/vendor/jquery/external/sizzle/dist/sizzle.min.js +0 -3
- package/build/styleguide/vendor/jquery/external/sizzle/dist/sizzle.min.map +0 -1
- package/build/styleguide/vendor/jquery/package.json +0 -97
- package/build/styleguide/vendor/jquery/src/.eslintrc.json +0 -5
- package/build/styleguide/vendor/jquery/src/ajax/jsonp.js +0 -102
- package/build/styleguide/vendor/jquery/src/ajax/load.js +0 -76
- package/build/styleguide/vendor/jquery/src/ajax/parseXML.js +0 -30
- package/build/styleguide/vendor/jquery/src/ajax/script.js +0 -77
- package/build/styleguide/vendor/jquery/src/ajax/var/location.js +0 -5
- package/build/styleguide/vendor/jquery/src/ajax/var/nonce.js +0 -7
- package/build/styleguide/vendor/jquery/src/ajax/var/rquery.js +0 -5
- package/build/styleguide/vendor/jquery/src/ajax/xhr.js +0 -169
- package/build/styleguide/vendor/jquery/src/ajax.js +0 -855
- package/build/styleguide/vendor/jquery/src/attributes/attr.js +0 -141
- package/build/styleguide/vendor/jquery/src/attributes/classes.js +0 -174
- package/build/styleguide/vendor/jquery/src/attributes/prop.js +0 -143
- package/build/styleguide/vendor/jquery/src/attributes/support.js +0 -33
- package/build/styleguide/vendor/jquery/src/attributes/val.js +0 -190
- package/build/styleguide/vendor/jquery/src/attributes.js +0 -13
- package/build/styleguide/vendor/jquery/src/callbacks.js +0 -234
- package/build/styleguide/vendor/jquery/src/core/DOMEval.js +0 -16
- package/build/styleguide/vendor/jquery/src/core/access.js +0 -70
- package/build/styleguide/vendor/jquery/src/core/init.js +0 -128
- package/build/styleguide/vendor/jquery/src/core/nodeName.js +0 -13
- package/build/styleguide/vendor/jquery/src/core/parseHTML.js +0 -65
- package/build/styleguide/vendor/jquery/src/core/ready-no-deferred.js +0 -96
- package/build/styleguide/vendor/jquery/src/core/ready.js +0 -86
- package/build/styleguide/vendor/jquery/src/core/readyException.js +0 -13
- package/build/styleguide/vendor/jquery/src/core/stripAndCollapse.js +0 -14
- package/build/styleguide/vendor/jquery/src/core/support.js +0 -20
- package/build/styleguide/vendor/jquery/src/core/var/rsingleTag.js +0 -6
- package/build/styleguide/vendor/jquery/src/core.js +0 -476
- package/build/styleguide/vendor/jquery/src/css/addGetHookIf.js +0 -26
- package/build/styleguide/vendor/jquery/src/css/adjustCSS.js +0 -71
- package/build/styleguide/vendor/jquery/src/css/curCSS.js +0 -65
- package/build/styleguide/vendor/jquery/src/css/hiddenVisibleSelectors.js +0 -15
- package/build/styleguide/vendor/jquery/src/css/showHide.js +0 -105
- package/build/styleguide/vendor/jquery/src/css/support.js +0 -89
- package/build/styleguide/vendor/jquery/src/css/var/cssExpand.js +0 -5
- package/build/styleguide/vendor/jquery/src/css/var/getStyles.js +0 -17
- package/build/styleguide/vendor/jquery/src/css/var/isHiddenWithinTree.js +0 -34
- package/build/styleguide/vendor/jquery/src/css/var/rmargin.js +0 -5
- package/build/styleguide/vendor/jquery/src/css/var/rnumnonpx.js +0 -7
- package/build/styleguide/vendor/jquery/src/css/var/swap.js +0 -26
- package/build/styleguide/vendor/jquery/src/css.js +0 -438
- package/build/styleguide/vendor/jquery/src/data/Data.js +0 -161
- package/build/styleguide/vendor/jquery/src/data/var/acceptData.js +0 -19
- package/build/styleguide/vendor/jquery/src/data/var/dataPriv.js +0 -7
- package/build/styleguide/vendor/jquery/src/data/var/dataUser.js +0 -7
- package/build/styleguide/vendor/jquery/src/data.js +0 -179
- package/build/styleguide/vendor/jquery/src/deferred/exceptionHook.js +0 -21
- package/build/styleguide/vendor/jquery/src/deferred.js +0 -391
- package/build/styleguide/vendor/jquery/src/deprecated.js +0 -40
- package/build/styleguide/vendor/jquery/src/dimensions.js +0 -56
- package/build/styleguide/vendor/jquery/src/effects/Tween.js +0 -123
- package/build/styleguide/vendor/jquery/src/effects/animatedSelector.js +0 -15
- package/build/styleguide/vendor/jquery/src/effects.js +0 -699
- package/build/styleguide/vendor/jquery/src/event/ajax.js +0 -22
- package/build/styleguide/vendor/jquery/src/event/alias.js +0 -29
- package/build/styleguide/vendor/jquery/src/event/focusin.js +0 -55
- package/build/styleguide/vendor/jquery/src/event/support.js +0 -11
- package/build/styleguide/vendor/jquery/src/event/trigger.js +0 -185
- package/build/styleguide/vendor/jquery/src/event.js +0 -746
- package/build/styleguide/vendor/jquery/src/exports/amd.js +0 -26
- package/build/styleguide/vendor/jquery/src/exports/global.js +0 -34
- package/build/styleguide/vendor/jquery/src/jquery.js +0 -41
- package/build/styleguide/vendor/jquery/src/manipulation/_evalUrl.js +0 -23
- package/build/styleguide/vendor/jquery/src/manipulation/buildFragment.js +0 -104
- package/build/styleguide/vendor/jquery/src/manipulation/getAll.js +0 -32
- package/build/styleguide/vendor/jquery/src/manipulation/setGlobalEval.js +0 -22
- package/build/styleguide/vendor/jquery/src/manipulation/support.js +0 -35
- package/build/styleguide/vendor/jquery/src/manipulation/var/rcheckableType.js +0 -5
- package/build/styleguide/vendor/jquery/src/manipulation/var/rscriptType.js +0 -5
- package/build/styleguide/vendor/jquery/src/manipulation/var/rtagName.js +0 -5
- package/build/styleguide/vendor/jquery/src/manipulation/wrapMap.js +0 -29
- package/build/styleguide/vendor/jquery/src/manipulation.js +0 -488
- package/build/styleguide/vendor/jquery/src/offset.js +0 -229
- package/build/styleguide/vendor/jquery/src/queue/delay.js +0 -24
- package/build/styleguide/vendor/jquery/src/queue.js +0 -145
- package/build/styleguide/vendor/jquery/src/selector-native.js +0 -237
- package/build/styleguide/vendor/jquery/src/selector-sizzle.js +0 -19
- package/build/styleguide/vendor/jquery/src/selector.js +0 -3
- package/build/styleguide/vendor/jquery/src/serialize.js +0 -130
- package/build/styleguide/vendor/jquery/src/traversing/findFilter.js +0 -106
- package/build/styleguide/vendor/jquery/src/traversing/var/dir.js +0 -22
- package/build/styleguide/vendor/jquery/src/traversing/var/rneedsContext.js +0 -8
- package/build/styleguide/vendor/jquery/src/traversing/var/siblings.js +0 -17
- package/build/styleguide/vendor/jquery/src/traversing.js +0 -191
- package/build/styleguide/vendor/jquery/src/var/ObjectFunctionString.js +0 -7
- package/build/styleguide/vendor/jquery/src/var/arr.js +0 -5
- package/build/styleguide/vendor/jquery/src/var/class2type.js +0 -6
- package/build/styleguide/vendor/jquery/src/var/concat.js +0 -7
- package/build/styleguide/vendor/jquery/src/var/document.js +0 -5
- package/build/styleguide/vendor/jquery/src/var/documentElement.js +0 -7
- package/build/styleguide/vendor/jquery/src/var/fnToString.js +0 -7
- package/build/styleguide/vendor/jquery/src/var/getProto.js +0 -5
- package/build/styleguide/vendor/jquery/src/var/hasOwn.js +0 -7
- package/build/styleguide/vendor/jquery/src/var/indexOf.js +0 -7
- package/build/styleguide/vendor/jquery/src/var/pnum.js +0 -5
- package/build/styleguide/vendor/jquery/src/var/push.js +0 -7
- package/build/styleguide/vendor/jquery/src/var/rcssNum.js +0 -9
- package/build/styleguide/vendor/jquery/src/var/rnothtmlwhite.js +0 -8
- package/build/styleguide/vendor/jquery/src/var/slice.js +0 -7
- package/build/styleguide/vendor/jquery/src/var/support.js +0 -6
- package/build/styleguide/vendor/jquery/src/var/toString.js +0 -7
- package/build/styleguide/vendor/jquery/src/wrap.js +0 -77
- package/build/styleguide/vendor/lightgallery/.editorconfig +0 -16
- package/build/styleguide/vendor/lightgallery/.gitattributes +0 -1
- package/build/styleguide/vendor/lightgallery/.jscsrc +0 -7
- package/build/styleguide/vendor/lightgallery/.jshintrc +0 -18
- package/build/styleguide/vendor/lightgallery/.travis.yml +0 -9
- package/build/styleguide/vendor/lightgallery/Gruntfile.js +0 -208
- package/build/styleguide/vendor/lightgallery/LICENSE.md +0 -686
- package/build/styleguide/vendor/lightgallery/README.md +0 -191
- package/build/styleguide/vendor/lightgallery/contributing.md +0 -34
- package/build/styleguide/vendor/lightgallery/demo/img/1-1600.jpg +0 -0
- package/build/styleguide/vendor/lightgallery/demo/img/1-375.jpg +0 -0
- package/build/styleguide/vendor/lightgallery/demo/img/1-480.jpg +0 -0
- package/build/styleguide/vendor/lightgallery/demo/img/1.jpg +0 -0
- package/build/styleguide/vendor/lightgallery/demo/img/13-1600.jpg +0 -0
- package/build/styleguide/vendor/lightgallery/demo/img/13-375.jpg +0 -0
- package/build/styleguide/vendor/lightgallery/demo/img/13-480.jpg +0 -0
- package/build/styleguide/vendor/lightgallery/demo/img/13.jpg +0 -0
- package/build/styleguide/vendor/lightgallery/demo/img/2-1600.jpg +0 -0
- package/build/styleguide/vendor/lightgallery/demo/img/2-375.jpg +0 -0
- package/build/styleguide/vendor/lightgallery/demo/img/2-480.jpg +0 -0
- package/build/styleguide/vendor/lightgallery/demo/img/2.jpg +0 -0
- package/build/styleguide/vendor/lightgallery/demo/img/4-1600.jpg +0 -0
- package/build/styleguide/vendor/lightgallery/demo/img/4-375.jpg +0 -0
- package/build/styleguide/vendor/lightgallery/demo/img/4-480.jpg +0 -0
- package/build/styleguide/vendor/lightgallery/demo/img/4.jpg +0 -0
- package/build/styleguide/vendor/lightgallery/demo/img/thumb-1.jpg +0 -0
- package/build/styleguide/vendor/lightgallery/demo/img/thumb-13.jpg +0 -0
- package/build/styleguide/vendor/lightgallery/demo/img/thumb-2.jpg +0 -0
- package/build/styleguide/vendor/lightgallery/demo/img/thumb-4.jpg +0 -0
- package/build/styleguide/vendor/lightgallery/demo/index.html +0 -162
- package/build/styleguide/vendor/lightgallery/dist/css/lg-fb-comment-box.css +0 -57
- package/build/styleguide/vendor/lightgallery/dist/css/lg-fb-comment-box.min.css +0 -1
- package/build/styleguide/vendor/lightgallery/dist/css/lg-transitions.css +0 -779
- package/build/styleguide/vendor/lightgallery/dist/css/lg-transitions.min.css +0 -1
- package/build/styleguide/vendor/lightgallery/dist/css/lightgallery.css +0 -982
- package/build/styleguide/vendor/lightgallery/dist/css/lightgallery.min.css +0 -1
- package/build/styleguide/vendor/lightgallery/dist/fonts/lg.eot +0 -0
- package/build/styleguide/vendor/lightgallery/dist/fonts/lg.svg +0 -47
- package/build/styleguide/vendor/lightgallery/dist/fonts/lg.ttf +0 -0
- package/build/styleguide/vendor/lightgallery/dist/fonts/lg.woff +0 -0
- package/build/styleguide/vendor/lightgallery/dist/img/loading.gif +0 -0
- package/build/styleguide/vendor/lightgallery/dist/img/video-play.png +0 -0
- package/build/styleguide/vendor/lightgallery/dist/img/vimeo-play.png +0 -0
- package/build/styleguide/vendor/lightgallery/dist/img/youtube-play.png +0 -0
- package/build/styleguide/vendor/lightgallery/dist/js/lightgallery-all.js +0 -3331
- package/build/styleguide/vendor/lightgallery/dist/js/lightgallery-all.min.js +0 -5
- package/build/styleguide/vendor/lightgallery/dist/js/lightgallery.js +0 -1364
- package/build/styleguide/vendor/lightgallery/dist/js/lightgallery.min.js +0 -4
- package/build/styleguide/vendor/lightgallery/lib/jquery.mousewheel.min.js +0 -8
- package/build/styleguide/vendor/lightgallery/lib/lg.png +0 -0
- package/build/styleguide/vendor/lightgallery/lib/picturefill.min.js +0 -4
- package/build/styleguide/vendor/lightgallery/lightGallery.jquery.json +0 -27
- package/build/styleguide/vendor/lightgallery/modules/lg-autoplay.js +0 -206
- package/build/styleguide/vendor/lightgallery/modules/lg-autoplay.min.js +0 -4
- package/build/styleguide/vendor/lightgallery/modules/lg-fullscreen.js +0 -116
- package/build/styleguide/vendor/lightgallery/modules/lg-fullscreen.min.js +0 -4
- package/build/styleguide/vendor/lightgallery/modules/lg-hash.js +0 -101
- package/build/styleguide/vendor/lightgallery/modules/lg-hash.min.js +0 -4
- package/build/styleguide/vendor/lightgallery/modules/lg-pager.js +0 -105
- package/build/styleguide/vendor/lightgallery/modules/lg-pager.min.js +0 -4
- package/build/styleguide/vendor/lightgallery/modules/lg-share.js +0 -107
- package/build/styleguide/vendor/lightgallery/modules/lg-share.min.js +0 -4
- package/build/styleguide/vendor/lightgallery/modules/lg-thumbnail.js +0 -478
- package/build/styleguide/vendor/lightgallery/modules/lg-thumbnail.min.js +0 -4
- package/build/styleguide/vendor/lightgallery/modules/lg-video.js +0 -317
- package/build/styleguide/vendor/lightgallery/modules/lg-video.min.js +0 -4
- package/build/styleguide/vendor/lightgallery/modules/lg-zoom.js +0 -527
- package/build/styleguide/vendor/lightgallery/modules/lg-zoom.min.js +0 -4
- package/build/styleguide/vendor/lightgallery/package.json +0 -60
- package/build/styleguide/vendor/lightgallery/selection.json +0 -407
- package/build/styleguide/vendor/lightgallery/src/css/lg-fb-comment-box.css +0 -54
- package/build/styleguide/vendor/lightgallery/src/css/lg-fb-comment-box.css.map +0 -7
- package/build/styleguide/vendor/lightgallery/src/css/lg-transitions.css +0 -776
- package/build/styleguide/vendor/lightgallery/src/css/lg-transitions.css.map +0 -7
- package/build/styleguide/vendor/lightgallery/src/css/lightgallery.css +0 -979
- package/build/styleguide/vendor/lightgallery/src/css/lightgallery.css.map +0 -7
- package/build/styleguide/vendor/lightgallery/src/fonts/lg.eot +0 -0
- package/build/styleguide/vendor/lightgallery/src/fonts/lg.svg +0 -47
- package/build/styleguide/vendor/lightgallery/src/fonts/lg.ttf +0 -0
- package/build/styleguide/vendor/lightgallery/src/fonts/lg.woff +0 -0
- package/build/styleguide/vendor/lightgallery/src/img/loading.gif +0 -0
- package/build/styleguide/vendor/lightgallery/src/img/video-play.png +0 -0
- package/build/styleguide/vendor/lightgallery/src/img/vimeo-play.png +0 -0
- package/build/styleguide/vendor/lightgallery/src/img/youtube-play.png +0 -0
- package/build/styleguide/vendor/lightgallery/src/js/.jshintrc +0 -22
- package/build/styleguide/vendor/lightgallery/src/js/lightgallery.js +0 -1342
- package/build/styleguide/vendor/lightgallery/src/sass/lg-animations.scss +0 -714
- package/build/styleguide/vendor/lightgallery/src/sass/lg-autoplay.scss +0 -36
- package/build/styleguide/vendor/lightgallery/src/sass/lg-core.scss +0 -272
- package/build/styleguide/vendor/lightgallery/src/sass/lg-fb-comment-box.scss +0 -52
- package/build/styleguide/vendor/lightgallery/src/sass/lg-fonts.scss +0 -22
- package/build/styleguide/vendor/lightgallery/src/sass/lg-fullscreen.scss +0 -9
- package/build/styleguide/vendor/lightgallery/src/sass/lg-mixins.scss +0 -330
- package/build/styleguide/vendor/lightgallery/src/sass/lg-pager.scss +0 -89
- package/build/styleguide/vendor/lightgallery/src/sass/lg-share.scss +0 -135
- package/build/styleguide/vendor/lightgallery/src/sass/lg-theme-default.scss +0 -208
- package/build/styleguide/vendor/lightgallery/src/sass/lg-thumbnail.scss +0 -111
- package/build/styleguide/vendor/lightgallery/src/sass/lg-transitions.scss +0 -766
- package/build/styleguide/vendor/lightgallery/src/sass/lg-variables.scss +0 -57
- package/build/styleguide/vendor/lightgallery/src/sass/lg-video.scss +0 -110
- package/build/styleguide/vendor/lightgallery/src/sass/lg-zoom.scss +0 -69
- package/build/styleguide/vendor/lightgallery/src/sass/lightgallery.scss +0 -15
- package/build/styleguide/vendor/lightgallery/src/sass/prepros.cfg +0 -530
- package/build/styleguide/vendor/lightgallery/test/.jshintrc +0 -33
- package/build/styleguide/vendor/lightgallery/test/lightgallery.html +0 -27
- package/build/styleguide/vendor/lightgallery/test/lightgallery_test.js +0 -16
- package/build/styleguide/vendor/masonry-layout/README.md +0 -80
- package/build/styleguide/vendor/masonry-layout/dist/masonry.pkgd.js +0 -2499
- package/build/styleguide/vendor/masonry-layout/dist/masonry.pkgd.min.js +0 -9
- package/build/styleguide/vendor/masonry-layout/masonry.js +0 -239
- package/postinstall.sh +0 -76
- package/version_tag.sh +0 -99
- package/yarn.lock +0 -7827
|
@@ -1,527 +0,0 @@
|
|
|
1
|
-
/*! lg-zoom - v1.1.0 - 2017-08-08
|
|
2
|
-
* http://sachinchoolur.github.io/lightGallery
|
|
3
|
-
* Copyright (c) 2017 Sachin N; Licensed GPLv3 */
|
|
4
|
-
|
|
5
|
-
(function (root, factory) {
|
|
6
|
-
if (typeof define === 'function' && define.amd) {
|
|
7
|
-
// AMD. Register as an anonymous module unless amdModuleId is set
|
|
8
|
-
define(['jquery'], function (a0) {
|
|
9
|
-
return (factory(a0));
|
|
10
|
-
});
|
|
11
|
-
} else if (typeof exports === 'object') {
|
|
12
|
-
// Node. Does not work with strict CommonJS, but
|
|
13
|
-
// only CommonJS-like environments that support module.exports,
|
|
14
|
-
// like Node.
|
|
15
|
-
module.exports = factory(require('jquery'));
|
|
16
|
-
} else {
|
|
17
|
-
factory(jQuery);
|
|
18
|
-
}
|
|
19
|
-
}(this, function ($) {
|
|
20
|
-
|
|
21
|
-
(function() {
|
|
22
|
-
|
|
23
|
-
'use strict';
|
|
24
|
-
|
|
25
|
-
var getUseLeft = function() {
|
|
26
|
-
var useLeft = false;
|
|
27
|
-
var isChrome = navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);
|
|
28
|
-
if (isChrome && parseInt(isChrome[2], 10) < 54) {
|
|
29
|
-
useLeft = true;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
return useLeft;
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
var defaults = {
|
|
36
|
-
scale: 1,
|
|
37
|
-
zoom: true,
|
|
38
|
-
actualSize: true,
|
|
39
|
-
enableZoomAfter: 300,
|
|
40
|
-
useLeftForZoom: getUseLeft()
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
var Zoom = function(element) {
|
|
44
|
-
|
|
45
|
-
this.core = $(element).data('lightGallery');
|
|
46
|
-
|
|
47
|
-
this.core.s = $.extend({}, defaults, this.core.s);
|
|
48
|
-
|
|
49
|
-
if (this.core.s.zoom && this.core.doCss()) {
|
|
50
|
-
this.init();
|
|
51
|
-
|
|
52
|
-
// Store the zoomable timeout value just to clear it while closing
|
|
53
|
-
this.zoomabletimeout = false;
|
|
54
|
-
|
|
55
|
-
// Set the initial value center
|
|
56
|
-
this.pageX = $(window).width() / 2;
|
|
57
|
-
this.pageY = ($(window).height() / 2) + $(window).scrollTop();
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
return this;
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
Zoom.prototype.init = function() {
|
|
64
|
-
|
|
65
|
-
var _this = this;
|
|
66
|
-
var zoomIcons = '<span id="lg-zoom-in" class="lg-icon"></span><span id="lg-zoom-out" class="lg-icon"></span>';
|
|
67
|
-
|
|
68
|
-
if (_this.core.s.actualSize) {
|
|
69
|
-
zoomIcons += '<span id="lg-actual-size" class="lg-icon"></span>';
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
if (_this.core.s.useLeftForZoom) {
|
|
73
|
-
_this.core.$outer.addClass('lg-use-left-for-zoom');
|
|
74
|
-
} else {
|
|
75
|
-
_this.core.$outer.addClass('lg-use-transition-for-zoom');
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
this.core.$outer.find('.lg-toolbar').append(zoomIcons);
|
|
79
|
-
|
|
80
|
-
// Add zoomable class
|
|
81
|
-
_this.core.$el.on('onSlideItemLoad.lg.tm.zoom', function(event, index, delay) {
|
|
82
|
-
|
|
83
|
-
// delay will be 0 except first time
|
|
84
|
-
var _speed = _this.core.s.enableZoomAfter + delay;
|
|
85
|
-
|
|
86
|
-
// set _speed value 0 if gallery opened from direct url and if it is first slide
|
|
87
|
-
if ($('body').hasClass('lg-from-hash') && delay) {
|
|
88
|
-
|
|
89
|
-
// will execute only once
|
|
90
|
-
_speed = 0;
|
|
91
|
-
} else {
|
|
92
|
-
|
|
93
|
-
// Remove lg-from-hash to enable starting animation.
|
|
94
|
-
$('body').removeClass('lg-from-hash');
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
_this.zoomabletimeout = setTimeout(function() {
|
|
98
|
-
_this.core.$slide.eq(index).addClass('lg-zoomable');
|
|
99
|
-
}, _speed + 30);
|
|
100
|
-
});
|
|
101
|
-
|
|
102
|
-
var scale = 1;
|
|
103
|
-
/**
|
|
104
|
-
* @desc Image zoom
|
|
105
|
-
* Translate the wrap and scale the image to get better user experience
|
|
106
|
-
*
|
|
107
|
-
* @param {String} scaleVal - Zoom decrement/increment value
|
|
108
|
-
*/
|
|
109
|
-
var zoom = function(scaleVal) {
|
|
110
|
-
|
|
111
|
-
var $image = _this.core.$outer.find('.lg-current .lg-image');
|
|
112
|
-
var _x;
|
|
113
|
-
var _y;
|
|
114
|
-
|
|
115
|
-
// Find offset manually to avoid issue after zoom
|
|
116
|
-
var offsetX = ($(window).width() - $image.prop('offsetWidth')) / 2;
|
|
117
|
-
var offsetY = (($(window).height() - $image.prop('offsetHeight')) / 2) + $(window).scrollTop();
|
|
118
|
-
|
|
119
|
-
_x = _this.pageX - offsetX;
|
|
120
|
-
_y = _this.pageY - offsetY;
|
|
121
|
-
|
|
122
|
-
var x = (scaleVal - 1) * (_x);
|
|
123
|
-
var y = (scaleVal - 1) * (_y);
|
|
124
|
-
|
|
125
|
-
$image.css('transform', 'scale3d(' + scaleVal + ', ' + scaleVal + ', 1)').attr('data-scale', scaleVal);
|
|
126
|
-
|
|
127
|
-
if (_this.core.s.useLeftForZoom) {
|
|
128
|
-
$image.parent().css({
|
|
129
|
-
left: -x + 'px',
|
|
130
|
-
top: -y + 'px'
|
|
131
|
-
}).attr('data-x', x).attr('data-y', y);
|
|
132
|
-
} else {
|
|
133
|
-
$image.parent().css('transform', 'translate3d(-' + x + 'px, -' + y + 'px, 0)').attr('data-x', x).attr('data-y', y);
|
|
134
|
-
}
|
|
135
|
-
};
|
|
136
|
-
|
|
137
|
-
var callScale = function() {
|
|
138
|
-
if (scale > 1) {
|
|
139
|
-
_this.core.$outer.addClass('lg-zoomed');
|
|
140
|
-
} else {
|
|
141
|
-
_this.resetZoom();
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
if (scale < 1) {
|
|
145
|
-
scale = 1;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
zoom(scale);
|
|
149
|
-
};
|
|
150
|
-
|
|
151
|
-
var actualSize = function(event, $image, index, fromIcon) {
|
|
152
|
-
var w = $image.prop('offsetWidth');
|
|
153
|
-
var nw;
|
|
154
|
-
if (_this.core.s.dynamic) {
|
|
155
|
-
nw = _this.core.s.dynamicEl[index].width || $image[0].naturalWidth || w;
|
|
156
|
-
} else {
|
|
157
|
-
nw = _this.core.$items.eq(index).attr('data-width') || $image[0].naturalWidth || w;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
var _scale;
|
|
161
|
-
|
|
162
|
-
if (_this.core.$outer.hasClass('lg-zoomed')) {
|
|
163
|
-
scale = 1;
|
|
164
|
-
} else {
|
|
165
|
-
if (nw > w) {
|
|
166
|
-
_scale = nw / w;
|
|
167
|
-
scale = _scale || 2;
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
if (fromIcon) {
|
|
172
|
-
_this.pageX = $(window).width() / 2;
|
|
173
|
-
_this.pageY = ($(window).height() / 2) + $(window).scrollTop();
|
|
174
|
-
} else {
|
|
175
|
-
_this.pageX = event.pageX || event.originalEvent.targetTouches[0].pageX;
|
|
176
|
-
_this.pageY = event.pageY || event.originalEvent.targetTouches[0].pageY;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
callScale();
|
|
180
|
-
setTimeout(function() {
|
|
181
|
-
_this.core.$outer.removeClass('lg-grabbing').addClass('lg-grab');
|
|
182
|
-
}, 10);
|
|
183
|
-
};
|
|
184
|
-
|
|
185
|
-
var tapped = false;
|
|
186
|
-
|
|
187
|
-
// event triggered after appending slide content
|
|
188
|
-
_this.core.$el.on('onAferAppendSlide.lg.tm.zoom', function(event, index) {
|
|
189
|
-
|
|
190
|
-
// Get the current element
|
|
191
|
-
var $image = _this.core.$slide.eq(index).find('.lg-image');
|
|
192
|
-
|
|
193
|
-
$image.on('dblclick', function(event) {
|
|
194
|
-
actualSize(event, $image, index);
|
|
195
|
-
});
|
|
196
|
-
|
|
197
|
-
$image.on('touchstart', function(event) {
|
|
198
|
-
if (!tapped) {
|
|
199
|
-
tapped = setTimeout(function() {
|
|
200
|
-
tapped = null;
|
|
201
|
-
}, 300);
|
|
202
|
-
} else {
|
|
203
|
-
clearTimeout(tapped);
|
|
204
|
-
tapped = null;
|
|
205
|
-
actualSize(event, $image, index);
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
event.preventDefault();
|
|
209
|
-
});
|
|
210
|
-
|
|
211
|
-
});
|
|
212
|
-
|
|
213
|
-
// Update zoom on resize and orientationchange
|
|
214
|
-
$(window).on('resize.lg.zoom scroll.lg.zoom orientationchange.lg.zoom', function() {
|
|
215
|
-
_this.pageX = $(window).width() / 2;
|
|
216
|
-
_this.pageY = ($(window).height() / 2) + $(window).scrollTop();
|
|
217
|
-
zoom(scale);
|
|
218
|
-
});
|
|
219
|
-
|
|
220
|
-
$('#lg-zoom-out').on('click.lg', function() {
|
|
221
|
-
if (_this.core.$outer.find('.lg-current .lg-image').length) {
|
|
222
|
-
scale -= _this.core.s.scale;
|
|
223
|
-
callScale();
|
|
224
|
-
}
|
|
225
|
-
});
|
|
226
|
-
|
|
227
|
-
$('#lg-zoom-in').on('click.lg', function() {
|
|
228
|
-
if (_this.core.$outer.find('.lg-current .lg-image').length) {
|
|
229
|
-
scale += _this.core.s.scale;
|
|
230
|
-
callScale();
|
|
231
|
-
}
|
|
232
|
-
});
|
|
233
|
-
|
|
234
|
-
$('#lg-actual-size').on('click.lg', function(event) {
|
|
235
|
-
actualSize(event, _this.core.$slide.eq(_this.core.index).find('.lg-image'), _this.core.index, true);
|
|
236
|
-
});
|
|
237
|
-
|
|
238
|
-
// Reset zoom on slide change
|
|
239
|
-
_this.core.$el.on('onBeforeSlide.lg.tm', function() {
|
|
240
|
-
scale = 1;
|
|
241
|
-
_this.resetZoom();
|
|
242
|
-
});
|
|
243
|
-
|
|
244
|
-
// Drag option after zoom
|
|
245
|
-
_this.zoomDrag();
|
|
246
|
-
|
|
247
|
-
_this.zoomSwipe();
|
|
248
|
-
|
|
249
|
-
};
|
|
250
|
-
|
|
251
|
-
// Reset zoom effect
|
|
252
|
-
Zoom.prototype.resetZoom = function() {
|
|
253
|
-
this.core.$outer.removeClass('lg-zoomed');
|
|
254
|
-
this.core.$slide.find('.lg-img-wrap').removeAttr('style data-x data-y');
|
|
255
|
-
this.core.$slide.find('.lg-image').removeAttr('style data-scale');
|
|
256
|
-
|
|
257
|
-
// Reset pagx pagy values to center
|
|
258
|
-
this.pageX = $(window).width() / 2;
|
|
259
|
-
this.pageY = ($(window).height() / 2) + $(window).scrollTop();
|
|
260
|
-
};
|
|
261
|
-
|
|
262
|
-
Zoom.prototype.zoomSwipe = function() {
|
|
263
|
-
var _this = this;
|
|
264
|
-
var startCoords = {};
|
|
265
|
-
var endCoords = {};
|
|
266
|
-
var isMoved = false;
|
|
267
|
-
|
|
268
|
-
// Allow x direction drag
|
|
269
|
-
var allowX = false;
|
|
270
|
-
|
|
271
|
-
// Allow Y direction drag
|
|
272
|
-
var allowY = false;
|
|
273
|
-
|
|
274
|
-
_this.core.$slide.on('touchstart.lg', function(e) {
|
|
275
|
-
|
|
276
|
-
if (_this.core.$outer.hasClass('lg-zoomed')) {
|
|
277
|
-
var $image = _this.core.$slide.eq(_this.core.index).find('.lg-object');
|
|
278
|
-
|
|
279
|
-
allowY = $image.prop('offsetHeight') * $image.attr('data-scale') > _this.core.$outer.find('.lg').height();
|
|
280
|
-
allowX = $image.prop('offsetWidth') * $image.attr('data-scale') > _this.core.$outer.find('.lg').width();
|
|
281
|
-
if ((allowX || allowY)) {
|
|
282
|
-
e.preventDefault();
|
|
283
|
-
startCoords = {
|
|
284
|
-
x: e.originalEvent.targetTouches[0].pageX,
|
|
285
|
-
y: e.originalEvent.targetTouches[0].pageY
|
|
286
|
-
};
|
|
287
|
-
}
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
});
|
|
291
|
-
|
|
292
|
-
_this.core.$slide.on('touchmove.lg', function(e) {
|
|
293
|
-
|
|
294
|
-
if (_this.core.$outer.hasClass('lg-zoomed')) {
|
|
295
|
-
|
|
296
|
-
var _$el = _this.core.$slide.eq(_this.core.index).find('.lg-img-wrap');
|
|
297
|
-
var distanceX;
|
|
298
|
-
var distanceY;
|
|
299
|
-
|
|
300
|
-
e.preventDefault();
|
|
301
|
-
isMoved = true;
|
|
302
|
-
|
|
303
|
-
endCoords = {
|
|
304
|
-
x: e.originalEvent.targetTouches[0].pageX,
|
|
305
|
-
y: e.originalEvent.targetTouches[0].pageY
|
|
306
|
-
};
|
|
307
|
-
|
|
308
|
-
// reset opacity and transition duration
|
|
309
|
-
_this.core.$outer.addClass('lg-zoom-dragging');
|
|
310
|
-
|
|
311
|
-
if (allowY) {
|
|
312
|
-
distanceY = (-Math.abs(_$el.attr('data-y'))) + (endCoords.y - startCoords.y);
|
|
313
|
-
} else {
|
|
314
|
-
distanceY = -Math.abs(_$el.attr('data-y'));
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
if (allowX) {
|
|
318
|
-
distanceX = (-Math.abs(_$el.attr('data-x'))) + (endCoords.x - startCoords.x);
|
|
319
|
-
} else {
|
|
320
|
-
distanceX = -Math.abs(_$el.attr('data-x'));
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
if ((Math.abs(endCoords.x - startCoords.x) > 15) || (Math.abs(endCoords.y - startCoords.y) > 15)) {
|
|
324
|
-
|
|
325
|
-
if (_this.core.s.useLeftForZoom) {
|
|
326
|
-
_$el.css({
|
|
327
|
-
left: distanceX + 'px',
|
|
328
|
-
top: distanceY + 'px'
|
|
329
|
-
});
|
|
330
|
-
} else {
|
|
331
|
-
_$el.css('transform', 'translate3d(' + distanceX + 'px, ' + distanceY + 'px, 0)');
|
|
332
|
-
}
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
});
|
|
338
|
-
|
|
339
|
-
_this.core.$slide.on('touchend.lg', function() {
|
|
340
|
-
if (_this.core.$outer.hasClass('lg-zoomed')) {
|
|
341
|
-
if (isMoved) {
|
|
342
|
-
isMoved = false;
|
|
343
|
-
_this.core.$outer.removeClass('lg-zoom-dragging');
|
|
344
|
-
_this.touchendZoom(startCoords, endCoords, allowX, allowY);
|
|
345
|
-
|
|
346
|
-
}
|
|
347
|
-
}
|
|
348
|
-
});
|
|
349
|
-
|
|
350
|
-
};
|
|
351
|
-
|
|
352
|
-
Zoom.prototype.zoomDrag = function() {
|
|
353
|
-
|
|
354
|
-
var _this = this;
|
|
355
|
-
var startCoords = {};
|
|
356
|
-
var endCoords = {};
|
|
357
|
-
var isDraging = false;
|
|
358
|
-
var isMoved = false;
|
|
359
|
-
|
|
360
|
-
// Allow x direction drag
|
|
361
|
-
var allowX = false;
|
|
362
|
-
|
|
363
|
-
// Allow Y direction drag
|
|
364
|
-
var allowY = false;
|
|
365
|
-
|
|
366
|
-
_this.core.$slide.on('mousedown.lg.zoom', function(e) {
|
|
367
|
-
|
|
368
|
-
// execute only on .lg-object
|
|
369
|
-
var $image = _this.core.$slide.eq(_this.core.index).find('.lg-object');
|
|
370
|
-
|
|
371
|
-
allowY = $image.prop('offsetHeight') * $image.attr('data-scale') > _this.core.$outer.find('.lg').height();
|
|
372
|
-
allowX = $image.prop('offsetWidth') * $image.attr('data-scale') > _this.core.$outer.find('.lg').width();
|
|
373
|
-
|
|
374
|
-
if (_this.core.$outer.hasClass('lg-zoomed')) {
|
|
375
|
-
if ($(e.target).hasClass('lg-object') && (allowX || allowY)) {
|
|
376
|
-
e.preventDefault();
|
|
377
|
-
startCoords = {
|
|
378
|
-
x: e.pageX,
|
|
379
|
-
y: e.pageY
|
|
380
|
-
};
|
|
381
|
-
|
|
382
|
-
isDraging = true;
|
|
383
|
-
|
|
384
|
-
// ** Fix for webkit cursor issue https://code.google.com/p/chromium/issues/detail?id=26723
|
|
385
|
-
_this.core.$outer.scrollLeft += 1;
|
|
386
|
-
_this.core.$outer.scrollLeft -= 1;
|
|
387
|
-
|
|
388
|
-
_this.core.$outer.removeClass('lg-grab').addClass('lg-grabbing');
|
|
389
|
-
}
|
|
390
|
-
}
|
|
391
|
-
});
|
|
392
|
-
|
|
393
|
-
$(window).on('mousemove.lg.zoom', function(e) {
|
|
394
|
-
if (isDraging) {
|
|
395
|
-
var _$el = _this.core.$slide.eq(_this.core.index).find('.lg-img-wrap');
|
|
396
|
-
var distanceX;
|
|
397
|
-
var distanceY;
|
|
398
|
-
|
|
399
|
-
isMoved = true;
|
|
400
|
-
endCoords = {
|
|
401
|
-
x: e.pageX,
|
|
402
|
-
y: e.pageY
|
|
403
|
-
};
|
|
404
|
-
|
|
405
|
-
// reset opacity and transition duration
|
|
406
|
-
_this.core.$outer.addClass('lg-zoom-dragging');
|
|
407
|
-
|
|
408
|
-
if (allowY) {
|
|
409
|
-
distanceY = (-Math.abs(_$el.attr('data-y'))) + (endCoords.y - startCoords.y);
|
|
410
|
-
} else {
|
|
411
|
-
distanceY = -Math.abs(_$el.attr('data-y'));
|
|
412
|
-
}
|
|
413
|
-
|
|
414
|
-
if (allowX) {
|
|
415
|
-
distanceX = (-Math.abs(_$el.attr('data-x'))) + (endCoords.x - startCoords.x);
|
|
416
|
-
} else {
|
|
417
|
-
distanceX = -Math.abs(_$el.attr('data-x'));
|
|
418
|
-
}
|
|
419
|
-
|
|
420
|
-
if (_this.core.s.useLeftForZoom) {
|
|
421
|
-
_$el.css({
|
|
422
|
-
left: distanceX + 'px',
|
|
423
|
-
top: distanceY + 'px'
|
|
424
|
-
});
|
|
425
|
-
} else {
|
|
426
|
-
_$el.css('transform', 'translate3d(' + distanceX + 'px, ' + distanceY + 'px, 0)');
|
|
427
|
-
}
|
|
428
|
-
}
|
|
429
|
-
});
|
|
430
|
-
|
|
431
|
-
$(window).on('mouseup.lg.zoom', function(e) {
|
|
432
|
-
|
|
433
|
-
if (isDraging) {
|
|
434
|
-
isDraging = false;
|
|
435
|
-
_this.core.$outer.removeClass('lg-zoom-dragging');
|
|
436
|
-
|
|
437
|
-
// Fix for chrome mouse move on click
|
|
438
|
-
if (isMoved && ((startCoords.x !== endCoords.x) || (startCoords.y !== endCoords.y))) {
|
|
439
|
-
endCoords = {
|
|
440
|
-
x: e.pageX,
|
|
441
|
-
y: e.pageY
|
|
442
|
-
};
|
|
443
|
-
_this.touchendZoom(startCoords, endCoords, allowX, allowY);
|
|
444
|
-
|
|
445
|
-
}
|
|
446
|
-
|
|
447
|
-
isMoved = false;
|
|
448
|
-
}
|
|
449
|
-
|
|
450
|
-
_this.core.$outer.removeClass('lg-grabbing').addClass('lg-grab');
|
|
451
|
-
|
|
452
|
-
});
|
|
453
|
-
};
|
|
454
|
-
|
|
455
|
-
Zoom.prototype.touchendZoom = function(startCoords, endCoords, allowX, allowY) {
|
|
456
|
-
|
|
457
|
-
var _this = this;
|
|
458
|
-
var _$el = _this.core.$slide.eq(_this.core.index).find('.lg-img-wrap');
|
|
459
|
-
var $image = _this.core.$slide.eq(_this.core.index).find('.lg-object');
|
|
460
|
-
var distanceX = (-Math.abs(_$el.attr('data-x'))) + (endCoords.x - startCoords.x);
|
|
461
|
-
var distanceY = (-Math.abs(_$el.attr('data-y'))) + (endCoords.y - startCoords.y);
|
|
462
|
-
var minY = (_this.core.$outer.find('.lg').height() - $image.prop('offsetHeight')) / 2;
|
|
463
|
-
var maxY = Math.abs(($image.prop('offsetHeight') * Math.abs($image.attr('data-scale'))) - _this.core.$outer.find('.lg').height() + minY);
|
|
464
|
-
var minX = (_this.core.$outer.find('.lg').width() - $image.prop('offsetWidth')) / 2;
|
|
465
|
-
var maxX = Math.abs(($image.prop('offsetWidth') * Math.abs($image.attr('data-scale'))) - _this.core.$outer.find('.lg').width() + minX);
|
|
466
|
-
|
|
467
|
-
if ((Math.abs(endCoords.x - startCoords.x) > 15) || (Math.abs(endCoords.y - startCoords.y) > 15)) {
|
|
468
|
-
if (allowY) {
|
|
469
|
-
if (distanceY <= -maxY) {
|
|
470
|
-
distanceY = -maxY;
|
|
471
|
-
} else if (distanceY >= -minY) {
|
|
472
|
-
distanceY = -minY;
|
|
473
|
-
}
|
|
474
|
-
}
|
|
475
|
-
|
|
476
|
-
if (allowX) {
|
|
477
|
-
if (distanceX <= -maxX) {
|
|
478
|
-
distanceX = -maxX;
|
|
479
|
-
} else if (distanceX >= -minX) {
|
|
480
|
-
distanceX = -minX;
|
|
481
|
-
}
|
|
482
|
-
}
|
|
483
|
-
|
|
484
|
-
if (allowY) {
|
|
485
|
-
_$el.attr('data-y', Math.abs(distanceY));
|
|
486
|
-
} else {
|
|
487
|
-
distanceY = -Math.abs(_$el.attr('data-y'));
|
|
488
|
-
}
|
|
489
|
-
|
|
490
|
-
if (allowX) {
|
|
491
|
-
_$el.attr('data-x', Math.abs(distanceX));
|
|
492
|
-
} else {
|
|
493
|
-
distanceX = -Math.abs(_$el.attr('data-x'));
|
|
494
|
-
}
|
|
495
|
-
|
|
496
|
-
if (_this.core.s.useLeftForZoom) {
|
|
497
|
-
_$el.css({
|
|
498
|
-
left: distanceX + 'px',
|
|
499
|
-
top: distanceY + 'px'
|
|
500
|
-
});
|
|
501
|
-
} else {
|
|
502
|
-
_$el.css('transform', 'translate3d(' + distanceX + 'px, ' + distanceY + 'px, 0)');
|
|
503
|
-
}
|
|
504
|
-
|
|
505
|
-
}
|
|
506
|
-
};
|
|
507
|
-
|
|
508
|
-
Zoom.prototype.destroy = function() {
|
|
509
|
-
|
|
510
|
-
var _this = this;
|
|
511
|
-
|
|
512
|
-
// Unbind all events added by lightGallery zoom plugin
|
|
513
|
-
_this.core.$el.off('.lg.zoom');
|
|
514
|
-
$(window).off('.lg.zoom');
|
|
515
|
-
_this.core.$slide.off('.lg.zoom');
|
|
516
|
-
_this.core.$el.off('.lg.tm.zoom');
|
|
517
|
-
_this.resetZoom();
|
|
518
|
-
clearTimeout(_this.zoomabletimeout);
|
|
519
|
-
_this.zoomabletimeout = false;
|
|
520
|
-
};
|
|
521
|
-
|
|
522
|
-
$.fn.lightGallery.modules.zoom = Zoom;
|
|
523
|
-
|
|
524
|
-
})();
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
}));
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*! lg-zoom - v1.1.0 - 2017-08-08
|
|
2
|
-
* http://sachinchoolur.github.io/lightGallery
|
|
3
|
-
* Copyright (c) 2017 Sachin N; Licensed GPLv3 */
|
|
4
|
-
!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof exports?module.exports=b(require("jquery")):b(jQuery)}(this,function(a){!function(){"use strict";var b=function(){var a=!1,b=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);return b&&parseInt(b[2],10)<54&&(a=!0),a},c={scale:1,zoom:!0,actualSize:!0,enableZoomAfter:300,useLeftForZoom:b()},d=function(b){return this.core=a(b).data("lightGallery"),this.core.s=a.extend({},c,this.core.s),this.core.s.zoom&&this.core.doCss()&&(this.init(),this.zoomabletimeout=!1,this.pageX=a(window).width()/2,this.pageY=a(window).height()/2+a(window).scrollTop()),this};d.prototype.init=function(){var b=this,c='<span id="lg-zoom-in" class="lg-icon"></span><span id="lg-zoom-out" class="lg-icon"></span>';b.core.s.actualSize&&(c+='<span id="lg-actual-size" class="lg-icon"></span>'),b.core.s.useLeftForZoom?b.core.$outer.addClass("lg-use-left-for-zoom"):b.core.$outer.addClass("lg-use-transition-for-zoom"),this.core.$outer.find(".lg-toolbar").append(c),b.core.$el.on("onSlideItemLoad.lg.tm.zoom",function(c,d,e){var f=b.core.s.enableZoomAfter+e;a("body").hasClass("lg-from-hash")&&e?f=0:a("body").removeClass("lg-from-hash"),b.zoomabletimeout=setTimeout(function(){b.core.$slide.eq(d).addClass("lg-zoomable")},f+30)});var d=1,e=function(c){var d,e,f=b.core.$outer.find(".lg-current .lg-image"),g=(a(window).width()-f.prop("offsetWidth"))/2,h=(a(window).height()-f.prop("offsetHeight"))/2+a(window).scrollTop();d=b.pageX-g,e=b.pageY-h;var i=(c-1)*d,j=(c-1)*e;f.css("transform","scale3d("+c+", "+c+", 1)").attr("data-scale",c),b.core.s.useLeftForZoom?f.parent().css({left:-i+"px",top:-j+"px"}).attr("data-x",i).attr("data-y",j):f.parent().css("transform","translate3d(-"+i+"px, -"+j+"px, 0)").attr("data-x",i).attr("data-y",j)},f=function(){d>1?b.core.$outer.addClass("lg-zoomed"):b.resetZoom(),d<1&&(d=1),e(d)},g=function(c,e,g,h){var i,j=e.prop("offsetWidth");i=b.core.s.dynamic?b.core.s.dynamicEl[g].width||e[0].naturalWidth||j:b.core.$items.eq(g).attr("data-width")||e[0].naturalWidth||j;var k;b.core.$outer.hasClass("lg-zoomed")?d=1:i>j&&(k=i/j,d=k||2),h?(b.pageX=a(window).width()/2,b.pageY=a(window).height()/2+a(window).scrollTop()):(b.pageX=c.pageX||c.originalEvent.targetTouches[0].pageX,b.pageY=c.pageY||c.originalEvent.targetTouches[0].pageY),f(),setTimeout(function(){b.core.$outer.removeClass("lg-grabbing").addClass("lg-grab")},10)},h=!1;b.core.$el.on("onAferAppendSlide.lg.tm.zoom",function(a,c){var d=b.core.$slide.eq(c).find(".lg-image");d.on("dblclick",function(a){g(a,d,c)}),d.on("touchstart",function(a){h?(clearTimeout(h),h=null,g(a,d,c)):h=setTimeout(function(){h=null},300),a.preventDefault()})}),a(window).on("resize.lg.zoom scroll.lg.zoom orientationchange.lg.zoom",function(){b.pageX=a(window).width()/2,b.pageY=a(window).height()/2+a(window).scrollTop(),e(d)}),a("#lg-zoom-out").on("click.lg",function(){b.core.$outer.find(".lg-current .lg-image").length&&(d-=b.core.s.scale,f())}),a("#lg-zoom-in").on("click.lg",function(){b.core.$outer.find(".lg-current .lg-image").length&&(d+=b.core.s.scale,f())}),a("#lg-actual-size").on("click.lg",function(a){g(a,b.core.$slide.eq(b.core.index).find(".lg-image"),b.core.index,!0)}),b.core.$el.on("onBeforeSlide.lg.tm",function(){d=1,b.resetZoom()}),b.zoomDrag(),b.zoomSwipe()},d.prototype.resetZoom=function(){this.core.$outer.removeClass("lg-zoomed"),this.core.$slide.find(".lg-img-wrap").removeAttr("style data-x data-y"),this.core.$slide.find(".lg-image").removeAttr("style data-scale"),this.pageX=a(window).width()/2,this.pageY=a(window).height()/2+a(window).scrollTop()},d.prototype.zoomSwipe=function(){var a=this,b={},c={},d=!1,e=!1,f=!1;a.core.$slide.on("touchstart.lg",function(c){if(a.core.$outer.hasClass("lg-zoomed")){var d=a.core.$slide.eq(a.core.index).find(".lg-object");f=d.prop("offsetHeight")*d.attr("data-scale")>a.core.$outer.find(".lg").height(),e=d.prop("offsetWidth")*d.attr("data-scale")>a.core.$outer.find(".lg").width(),(e||f)&&(c.preventDefault(),b={x:c.originalEvent.targetTouches[0].pageX,y:c.originalEvent.targetTouches[0].pageY})}}),a.core.$slide.on("touchmove.lg",function(g){if(a.core.$outer.hasClass("lg-zoomed")){var h,i,j=a.core.$slide.eq(a.core.index).find(".lg-img-wrap");g.preventDefault(),d=!0,c={x:g.originalEvent.targetTouches[0].pageX,y:g.originalEvent.targetTouches[0].pageY},a.core.$outer.addClass("lg-zoom-dragging"),i=f?-Math.abs(j.attr("data-y"))+(c.y-b.y):-Math.abs(j.attr("data-y")),h=e?-Math.abs(j.attr("data-x"))+(c.x-b.x):-Math.abs(j.attr("data-x")),(Math.abs(c.x-b.x)>15||Math.abs(c.y-b.y)>15)&&(a.core.s.useLeftForZoom?j.css({left:h+"px",top:i+"px"}):j.css("transform","translate3d("+h+"px, "+i+"px, 0)"))}}),a.core.$slide.on("touchend.lg",function(){a.core.$outer.hasClass("lg-zoomed")&&d&&(d=!1,a.core.$outer.removeClass("lg-zoom-dragging"),a.touchendZoom(b,c,e,f))})},d.prototype.zoomDrag=function(){var b=this,c={},d={},e=!1,f=!1,g=!1,h=!1;b.core.$slide.on("mousedown.lg.zoom",function(d){var f=b.core.$slide.eq(b.core.index).find(".lg-object");h=f.prop("offsetHeight")*f.attr("data-scale")>b.core.$outer.find(".lg").height(),g=f.prop("offsetWidth")*f.attr("data-scale")>b.core.$outer.find(".lg").width(),b.core.$outer.hasClass("lg-zoomed")&&a(d.target).hasClass("lg-object")&&(g||h)&&(d.preventDefault(),c={x:d.pageX,y:d.pageY},e=!0,b.core.$outer.scrollLeft+=1,b.core.$outer.scrollLeft-=1,b.core.$outer.removeClass("lg-grab").addClass("lg-grabbing"))}),a(window).on("mousemove.lg.zoom",function(a){if(e){var i,j,k=b.core.$slide.eq(b.core.index).find(".lg-img-wrap");f=!0,d={x:a.pageX,y:a.pageY},b.core.$outer.addClass("lg-zoom-dragging"),j=h?-Math.abs(k.attr("data-y"))+(d.y-c.y):-Math.abs(k.attr("data-y")),i=g?-Math.abs(k.attr("data-x"))+(d.x-c.x):-Math.abs(k.attr("data-x")),b.core.s.useLeftForZoom?k.css({left:i+"px",top:j+"px"}):k.css("transform","translate3d("+i+"px, "+j+"px, 0)")}}),a(window).on("mouseup.lg.zoom",function(a){e&&(e=!1,b.core.$outer.removeClass("lg-zoom-dragging"),!f||c.x===d.x&&c.y===d.y||(d={x:a.pageX,y:a.pageY},b.touchendZoom(c,d,g,h)),f=!1),b.core.$outer.removeClass("lg-grabbing").addClass("lg-grab")})},d.prototype.touchendZoom=function(a,b,c,d){var e=this,f=e.core.$slide.eq(e.core.index).find(".lg-img-wrap"),g=e.core.$slide.eq(e.core.index).find(".lg-object"),h=-Math.abs(f.attr("data-x"))+(b.x-a.x),i=-Math.abs(f.attr("data-y"))+(b.y-a.y),j=(e.core.$outer.find(".lg").height()-g.prop("offsetHeight"))/2,k=Math.abs(g.prop("offsetHeight")*Math.abs(g.attr("data-scale"))-e.core.$outer.find(".lg").height()+j),l=(e.core.$outer.find(".lg").width()-g.prop("offsetWidth"))/2,m=Math.abs(g.prop("offsetWidth")*Math.abs(g.attr("data-scale"))-e.core.$outer.find(".lg").width()+l);(Math.abs(b.x-a.x)>15||Math.abs(b.y-a.y)>15)&&(d&&(i<=-k?i=-k:i>=-j&&(i=-j)),c&&(h<=-m?h=-m:h>=-l&&(h=-l)),d?f.attr("data-y",Math.abs(i)):i=-Math.abs(f.attr("data-y")),c?f.attr("data-x",Math.abs(h)):h=-Math.abs(f.attr("data-x")),e.core.s.useLeftForZoom?f.css({left:h+"px",top:i+"px"}):f.css("transform","translate3d("+h+"px, "+i+"px, 0)"))},d.prototype.destroy=function(){var b=this;b.core.$el.off(".lg.zoom"),a(window).off(".lg.zoom"),b.core.$slide.off(".lg.zoom"),b.core.$el.off(".lg.tm.zoom"),b.resetZoom(),clearTimeout(b.zoomabletimeout),b.zoomabletimeout=!1},a.fn.lightGallery.modules.zoom=d}()});
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "lightgallery",
|
|
3
|
-
"version": "1.6.3",
|
|
4
|
-
"description": "A lightweight, customizable, modular, responsive, lightbox gallery plugin for jQuery.",
|
|
5
|
-
"keywords": [
|
|
6
|
-
"jquery-plugin",
|
|
7
|
-
"gallery",
|
|
8
|
-
"lightbox",
|
|
9
|
-
"image",
|
|
10
|
-
"youtube",
|
|
11
|
-
"vimeo",
|
|
12
|
-
"dailymotion",
|
|
13
|
-
"html5 videos",
|
|
14
|
-
"thumbnails",
|
|
15
|
-
"zoom",
|
|
16
|
-
"fullscreen",
|
|
17
|
-
"responsive",
|
|
18
|
-
"touch",
|
|
19
|
-
"drag"
|
|
20
|
-
],
|
|
21
|
-
"homepage": "http://sachinchoolur.github.io/lightGallery/",
|
|
22
|
-
"bugs": {
|
|
23
|
-
"url": "https://github.com/sachinchoolur/lightGallery/issues"
|
|
24
|
-
},
|
|
25
|
-
"license": "GPLv3",
|
|
26
|
-
"author": {
|
|
27
|
-
"name": "Sachin N",
|
|
28
|
-
"email": "sachi77n@gmail.com",
|
|
29
|
-
"url": "https://github.com/sachinchoolur"
|
|
30
|
-
},
|
|
31
|
-
"main": "dist/js/lightgallery.js",
|
|
32
|
-
"repository": {
|
|
33
|
-
"type": "git",
|
|
34
|
-
"url": "https://github.com/sachinchoolur/lightGallery.git"
|
|
35
|
-
},
|
|
36
|
-
"dependencies": {
|
|
37
|
-
"jquery": ">=1.7.0"
|
|
38
|
-
},
|
|
39
|
-
"scripts": {
|
|
40
|
-
"test": "grunt"
|
|
41
|
-
},
|
|
42
|
-
"devDependencies": {
|
|
43
|
-
"grunt": "^0.4.5",
|
|
44
|
-
"grunt-banner": "^0.6.0",
|
|
45
|
-
"grunt-contrib-clean": "^0.6.0",
|
|
46
|
-
"grunt-contrib-concat": "^0.5.0",
|
|
47
|
-
"grunt-contrib-connect": "^0.9.0",
|
|
48
|
-
"grunt-contrib-copy": "^0.8.0",
|
|
49
|
-
"grunt-contrib-cssmin": "^0.12.1",
|
|
50
|
-
"grunt-contrib-jshint": "^0.10.0",
|
|
51
|
-
"grunt-contrib-qunit": "^0.5.1",
|
|
52
|
-
"grunt-contrib-sass": "^0.9.2",
|
|
53
|
-
"grunt-contrib-uglify": "^0.7.0",
|
|
54
|
-
"grunt-contrib-watch": "^0.6.1",
|
|
55
|
-
"grunt-umd": "^2.3.6",
|
|
56
|
-
"jshint-stylish": "^1.0.0",
|
|
57
|
-
"load-grunt-tasks": "^2.0.0",
|
|
58
|
-
"time-grunt": "^1.0.0"
|
|
59
|
-
}
|
|
60
|
-
}
|