From ad2e292deb21144fdaf5cc8672bbd72c28398a00 Mon Sep 17 00:00:00 2001
From: Kris-B
Date: Tue, 8 Sep 2020 17:00:59 +0000
Subject: [PATCH] [ci skip]
---
dist/jquery.nanogallery2.core.min.js | 8 +-
dist/jquery.nanogallery2.js | 908 +++++++--------------------
dist/jquery.nanogallery2.min.js | 8 +-
3 files changed, 223 insertions(+), 701 deletions(-)
diff --git a/dist/jquery.nanogallery2.core.min.js b/dist/jquery.nanogallery2.core.min.js
index 03ddf87e..187762aa 100644
--- a/dist/jquery.nanogallery2.core.min.js
+++ b/dist/jquery.nanogallery2.core.min.js
@@ -18,14 +18,14 @@
* - webfont generated with http://fontello.com - mainly based on Font Awesome Copyright (C) 2012 by Dave Gandy (http://fontawesome.io/)
* - ICO online converter: https://iconverticons.com/online/
*/
-!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports&&"function"==typeof require?e(require("jquery")):e(jQuery)}((function(e){"use strict";function t(e){var t=document.getElementById("ngyColorHelperToRGB");return null===t&&((t=document.createElement("div")).id="ngyColorHelperToRGB",t.style.cssText="display: none; color:"+e+";",document.body.appendChild(t)),getComputedStyle(t).color}function n(e,t,n){var i="";if("RGBA("==t.toUpperCase().substring(0,5)&&(i="a",t="rgb("+t.substring(5)),"number"!=typeof e||e<-1||e>1||"string"!=typeof t||"r"!=t[0]&&"#"!=t[0]||"string"!=typeof n&&void 0!==n)return null;function a(e){var t=e.length,n=new Object;if(t>9){if((e=e.split(",")).length<3||e.length>4)return null;n[0]=o(e[0].slice(4)),n[1]=o(e[1]),n[2]=o(e[2]),n[3]=e[3]?parseFloat(e[3]):-1}else{if(8==t||6==t||t<4)return null;t<6&&(e="#"+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+(t>4?e[4]+""+e[4]:"")),e=o(e.slice(1),16),n[0]=e>>16&255,n[1]=e>>8&255,n[2]=255&e,n[3]=9==t||5==t?r((e>>24&255)/255*1e4)/1e4:-1}return n}var o=parseInt,r=Math.round,l=t.length>9,s=(l="string"==typeof n?n.length>9||"c"==n&&!l:l,e<0),u=(e=s?-1*e:e,n=n&&"c"!=n?n:s?"#000000":"#FFFFFF",a(t)),c=a(n);return u&&c?l?"rgb"+i+"("+r((c[0]-u[0])*e+u[0])+","+r((c[1]-u[1])*e+u[1])+","+r((c[2]-u[2])*e+u[2])+(u[3]<0&&c[3]<0?")":","+(u[3]>-1&&c[3]>-1?r(1e4*((c[3]-u[3])*e+u[3]))/1e4:c[3]<0?u[3]:c[3])+")"):"#"+(4294967296+16777216*(u[3]>-1&&c[3]>-1?r(255*((c[3]-u[3])*e+u[3])):c[3]>-1?r(255*c[3]):u[3]>-1?r(255*u[3]):255)+65536*r((c[0]-u[0])*e+u[0])+256*r((c[1]-u[1])*e+u[1])+r((c[2]-u[2])*e+u[2])).toString(16).slice(u[3]>-1||c[3]>-1?1:3):null}function i(e){if(null===e||"object"!=typeof e)return e;var t=e.constructor();for(var n in e)t[n]=i(e[n]);return t}function a(){var e=jQuery(window);return{l:e.scrollLeft(),t:e.scrollTop(),w:e.width(),h:e.height()}}function o(e,t){var n=0;""==e&&(e="*"),jQuery(e).each((function(){var e=parseInt(jQuery(this).css("z-index"));n=e>n?e:n})),n++,jQuery(t).css("z-index",n)}var r=function(e){return{}.toString.call(e).match(/\s([a-zA-Z]+)/)[1].toLowerCase()};function l(){this.LightboxReOpen=function(){p()},this.ReloadAlbum=function(){if(""===c.O.kind)throw"Not supported for this content source:"+c.O.kind;var e=c.GOM.albumIdx;if(-1==e)throw"Current album not found.";for(var t=c.I[e].GetID(),n=c.I.length,i=0;i1&&e--,c.GOM.pagination.currentPage=e,c.GOM.ScrollToTop(),V(),Y(!0),!1},this.PaginationCountPages=function(){return 0==c.GOM.items.length?0:Math.ceil((c.GOM.items[c.GOM.items.length-1].row+1)/c.galleryMaxRows.Get())};var s=function(e,t,n){var i,a,o,r=null,l=0;n||(n={});var s=function(){l=!1===n.leading?0:(new Date).getTime(),r=null,o=e.apply(i,a),r||(i=a=null)};return function(){var u=(new Date).getTime();l||!1!==n.leading||(l=u);var c=t-(u-l);return i=this,a=arguments,c<=0||c>t?(r&&(clearTimeout(r),r=null),l=u,o=e.apply(i,a),r||(i=a=null)):r||!1===n.trailing||(r=setTimeout(s,c)),o}},u=function(e,t,n){var i;return function(){var a=this,o=arguments;function r(){n||e.apply(a,o),i=null}i?clearTimeout(i):n&&e.apply(a,o),i=setTimeout(r,t||100)}};window.ng_draf=function(e){return requestAnimationFrame((function(){window.requestAnimationFrame(e)}))},window.requestTimeout=function(e,t){if(!(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame&&window.mozCancelRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame))return window.setTimeout(e,t);var n=(new Date).getTime(),i=new Object;return i.value=requestAnimFrame((function a(){(new Date).getTime()-n>=t?e.call():i.value=requestAnimFrame(a)})),i},window.requestAnimFrame=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(e,t){window.setTimeout(e,1e3/60)},window.clearRequestTimeout=function(e){window.cancelAnimationFrame?window.cancelAnimationFrame(e.value):window.webkitCancelAnimationFrame?window.webkitCancelAnimationFrame(e.value):window.webkitCancelRequestAnimationFrame?window.webkitCancelRequestAnimationFrame(e.value):window.mozCancelRequestAnimationFrame?window.mozCancelRequestAnimationFrame(e.value):window.oCancelRequestAnimationFrame?window.oCancelRequestAnimationFrame(e.value):window.msCancelRequestAnimationFrame?window.msCancelRequestAnimationFrame(e.value):clearTimeout(e)};var c=this;function h(e){this.$e=null,this.ngy2ItemIdx=e,this.mediaNumber=c.VOM.items.length+1,this.posX=0,this.posY=0}c.I=[],c.Id=[],c.O=null,c.baseEltID=null,c.$E={base:null,conTnParent:null,conLoadingB:null,conConsole:null,conNavigationBar:null,conTnBottom:null,scrollableParent:null},c.shoppingCart=[],c.layout={internal:!0,engine:"",support:{rows:!1},prerequisite:{imageSize:!1},SetEngine:function(){if(c.layout.internal){if("auto"==c.tn.settings.width[c.GOM.curNavLevel][c.GOM.curWidth]||""==c.tn.settings.width[c.GOM.curNavLevel][c.GOM.curWidth])return c.layout.engine="JUSTIFIED",c.layout.support.rows=!0,void(c.layout.prerequisite.imageSize=!0);if("auto"==c.tn.settings.height[c.GOM.curNavLevel][c.GOM.curWidth]||""==c.tn.settings.height[c.GOM.curNavLevel][c.GOM.curWidth])return c.layout.engine="CASCADING",c.layout.support.rows=!1,void(c.layout.prerequisite.imageSize=!0);if(null!=c.tn.settings.getMosaic())return c.layout.engine="MOSAIC",c.layout.support.rows=!0,void(c.layout.prerequisite.imageSize=!1);c.layout.engine="GRID",c.layout.support.rows=!0,c.layout.prerequisite.imageSize=!1}}},c.galleryResizeEventEnabled=!1,c.galleryMaxRows={l1:0,lN:0,Get:function(){return c.galleryMaxRows[c.GOM.curNavLevel]}},c.galleryMaxItems={l1:0,lN:0,Get:function(){return c.galleryMaxItems[c.GOM.curNavLevel]}},c.galleryFilterTags={l1:0,lN:0,Get:function(){return c.galleryFilterTags[c.GOM.curNavLevel]}},c.galleryFilterTagsMode={l1:0,lN:0,Get:function(){return c.galleryFilterTagsMode[c.GOM.curNavLevel]}},c.galleryDisplayMode={l1:"FULLCONTENT",lN:"FULLCONTENT",Get:function(){return c.galleryDisplayMode[c.GOM.curNavLevel]}},c.galleryLastRowFull={l1:!1,lN:!1,Get:function(){return c.galleryLastRowFull[c.GOM.curNavLevel]}},c.gallerySorting={l1:"",lN:"",Get:function(){return c.gallerySorting[c.GOM.curNavLevel]}},c.galleryDisplayTransition={l1:"none",lN:"none",Get:function(){return c.galleryDisplayTransition[c.GOM.curNavLevel]}},c.galleryDisplayTransitionDuration={l1:500,lN:500,Get:function(){return c.galleryDisplayTransitionDuration[c.GOM.curNavLevel]}},c.$currentTouchedThumbnail=null,c.tn={opt:{l1:{crop:!0,stacks:0,stacksTranslateX:0,stacksTranslateY:0,stacksTranslateZ:0,stacksRotateX:0,stacksRotateY:0,stacksRotateZ:0,stacksScale:0,borderHorizontal:0,borderVertical:0,baseGridHeight:0,displayTransition:"FADEIN",displayTransitionStartVal:0,displayTransitionEasing:"easeOutQuart",displayTransitionDuration:240,displayInterval:15},lN:{crop:!0,stacks:0,stacksTranslateX:0,stacksTranslateY:0,stacksTranslateZ:0,stacksRotateX:0,stacksRotateY:0,stacksRotateZ:0,stacksScale:0,borderHorizontal:0,borderVertical:0,baseGridHeight:0,displayTransition:"FADEIN",displayTransitionStartVal:0,displayTransitionEasing:"easeOutQuart",displayTransitionDuration:240,displayInterval:15},Get:function(e){return c.tn.opt[c.GOM.curNavLevel][e]}},scale:1,labelHeight:{l1:0,lN:0,get:function(){return c.tn.labelHeight[c.GOM.curNavLevel]}},defaultSize:{width:{l1:{xs:0,sm:0,me:0,la:0,xl:0},lN:{xs:0,sm:0,me:0,la:0,xl:0}},height:{l1:{xs:0,sm:0,me:0,la:0,xl:0},lN:{xs:0,sm:0,me:0,la:0,xl:0}},getWidth:function(){return c.tn.defaultSize.width[c.GOM.curNavLevel][c.GOM.curWidth]},getOuterWidth:function(){c.tn.borderWidth=c.tn.opt.Get("borderHorizontal"),c.tn.borderHeight=c.tn.opt.Get("borderVertical");var e=c.tn.defaultSize.width[c.GOM.curNavLevel][c.GOM.curWidth]+2*c.tn.opt.Get("borderHorizontal");return"right"!=c.O.thumbnailLabel.get("position")&&"left"!=c.O.thumbnailLabel.get("position")||(e+=c.tn.defaultSize.width[c.GOM.curNavLevel][c.GOM.curWidth]),e},getHeight:function(){return c.tn.defaultSize.height[c.GOM.curNavLevel][c.GOM.curWidth]},getOuterHeight:function(){return c.tn.defaultSize.height[c.GOM.curNavLevel][c.GOM.curWidth]+2*c.tn.opt.Get("borderVertical")}},settings:{width:{l1:{xs:0,sm:0,me:0,la:0,xl:0,xsc:"u",smc:"u",mec:"u",lac:"u",xlc:"u"},lN:{xs:0,sm:0,me:0,la:0,xl:0,xsc:"u",smc:"u",mec:"u",lac:"u",xlc:"u"}},height:{l1:{xs:0,sm:0,me:0,la:0,xl:0,xsc:"u",smc:"u",mec:"u",lac:"u",xlc:"u"},lN:{xs:0,sm:0,me:0,la:0,xl:0,xsc:"u",smc:"u",mec:"u",lac:"u",xlc:"u"}},getH:function(e,t){var n=null==e?c.GOM.curNavLevel:e,i=null==t?c.GOM.curWidth:t;return"MOSAIC"==c.layout.engine?this.height[n][i]*this.mosaic[n+"Factor"].h[i]:this.height[n][i]},getW:function(e,t){var n=null==e?c.GOM.curNavLevel:e,i=null==t?c.GOM.curWidth:t;return"MOSAIC"==c.layout.engine?this.width[n][i]*this.mosaic[n+"Factor"].w[i]:this.width[n][i]},mosaic:{l1:{xs:null,sm:null,me:null,la:null,xl:null},lN:{xs:null,sm:null,me:null,la:null,xl:null},l1Factor:{h:{xs:1,sm:1,me:1,la:1,xl:1},w:{xs:1,sm:1,me:1,la:1,xl:1}},lNFactor:{h:{xs:1,sm:1,me:1,la:1,xl:1},w:{xs:1,sm:1,me:1,la:1,xl:1}}},getMosaic:function(){return this.mosaic[c.GOM.curNavLevel][c.GOM.curWidth]},mosaicCalcFactor:function(e,t){for(var n=1,i=1,a=0;a0&&-1!=c.GOM.lastFullRow)return!0}return!1}},tn_slider:{hostIdx:-1,hostItem:null,currentIdx:0,nextIdx:0,timerID:0,tween:null},NGY2Item:function(e){if(null==c.GOM.items[e]||null==c.GOM.items[e])return null;var t=c.GOM.items[e].thumbnailIdx;return c.I[t]},GTn:function(e,t,n){this.thumbnailIdx=e,this.width=0,this.height=0,this.top=0,this.left=0,this.row=0,this.imageWidth=t,this.imageHeight=n,this.resizedContentWidth=0,this.resizedContentHeight=0,this.displayed=!1,this.neverDisplayed=!0,this.inDisplayInterval=!1},ScrollToTop:function(){var e,t,n,i;if(!c.GOM.firstDisplay&&(null!==c.$E.scrollableParent||(e=c.$E.base,t=20,n=a(),(i=e.offset()).top>=n.t&&i.top<=n.t+n.h-t)||c.$E.base.get(0).scrollIntoView(),null!==c.$E.scrollableParent)){var o=c.$E.scrollableParent.scrollTop(),r=Math.abs(c.$E.scrollableParent.offset().top-c.$E.base.offset().top-o);o>r&&window.ng_draf((function(){c.$E.scrollableParent.scrollTop(r)}))}}},c.VOM={viewerDisplayed:!1,viewerIsFullscreen:!1,infoDisplayed:!1,toolbarsDisplayed:!0,toolsHide:null,zoom:{posX:0,posY:0,userFactor:1,isZooming:!1},padding:{H:0,V:0},window:{lastWidth:0,lastHeight:0},$viewer:null,$toolbar:null,$toolbarTL:null,$toolbarTR:null,toolbarMode:"std",playSlideshow:!1,playSlideshowTimerID:0,slideshowDelay:3e3,albumID:-1,viewerMediaIsChanged:!1,items:[],panMode:"off",$baseCont:null,$content:null,content:{previous:{vIdx:-1,$media:null,NGY2Item:function(){return c.I[c.VOM.items[c.VOM.content.previous.vIdx].ngy2ItemIdx]}},current:{vIdx:-1,$media:null,NGY2Item:function(){return c.I[c.VOM.items[c.VOM.content.current.vIdx].ngy2ItemIdx]}},next:{vIdx:-1,$media:null,NGY2Item:function(){return c.I[c.VOM.items[c.VOM.content.next.vIdx].ngy2ItemIdx]}}},IdxNext:function(){var e=0;return c.VOM.content.current.vIdx=t){var n=this.oneTmbWidth*c.VOM.content.current.vIdx;n+this.posX=this.vwidth&&(this.posX=this.vwidth-(n+this.oneTmbWidth))}this.PanGallery(0)}},PanGallery:function(e){this.gwidththis.vwidth-this.oneTmbWidth&&(this.posX=this.vwidth-this.oneTmbWidth),this.posX+this.gwidthc.VOM.ImageLoader.maxChecks?(c.VOM.ImageLoader.list[i]=null,e.callback(0,0,e.ngitem,e.checks)):(t++,e.checks++));0==t&&(c.VOM.ImageLoader.list=[],clearInterval(c.VOM.ImageLoader.intervalHandle),delete c.VOM.ImageLoader.intervalHandle)}}},c.popup={isDisplayed:!1,$elt:null,close:function(){null!=this.$elt&&(new NGTweenable).tween({from:{opacity:1},to:{opacity:0},attachment:{t:this},easing:"easeInOutSine",duration:100,step:function(e,t){null!=t.t.$elt&&t.t.$elt.css("opacity",e.opacity)},finish:function(e,t){null!=t.t.$elt&&(t.t.$elt.remove(),t.t.$elt=null),t.t.isDisplayed=!1}})}},c.galleryTheme_dark={navigationBar:{background:"none",borderTop:"",borderBottom:"",borderRight:"",borderLeft:""},navigationBreadcrumb:{background:"#111",color:"#fff",colorHover:"#ccc",borderRadius:"4px"},navigationFilter:{color:"#ddd",background:"#111",colorSelected:"#fff",backgroundSelected:"#111",borderRadius:"4px"},navigationPagination:{background:"#111",color:"#fff",colorHover:"#ccc",borderRadius:"4px"},thumbnail:{background:"#444",backgroundImage:"linear-gradient(315deg, #111 0%, #445 90%)",borderColor:"#000",borderRadius:"0px",labelOpacity:1,labelBackground:"rgba(34, 34, 34, 0)",titleColor:"#fff",titleBgColor:"transparent",titleShadow:"",descriptionColor:"#ccc",descriptionBgColor:"transparent",descriptionShadow:"",stackBackground:"#aaa"},thumbnailIcon:{padding:"5px",color:"#fff",shadow:""},pagination:{background:"#181818",backgroundSelected:"#666",color:"#fff",borderRadius:"2px",shapeBorder:"3px solid #666",shapeColor:"#444",shapeSelectedColor:"#aaa"}},c.galleryTheme_light={navigationBar:{background:"none",borderTop:"",borderBottom:"",borderRight:"",borderLeft:""},navigationBreadcrumb:{background:"#eee",color:"#000",colorHover:"#333",borderRadius:"4px"},navigationFilter:{background:"#eee",color:"#222",colorSelected:"#000",backgroundSelected:"#eee",borderRadius:"4px"},navigationPagination:{background:"#eee",color:"#000",colorHover:"#333",borderRadius:"4px"},thumbnail:{background:"#444",backgroundImage:"linear-gradient(315deg, #111 0%, #445 90%)",borderColor:"#000",labelOpacity:1,labelBackground:"rgba(34, 34, 34, 0)",titleColor:"#fff",titleBgColor:"transparent",titleShadow:"",descriptionColor:"#ccc",descriptionBgColor:"transparent",descriptionShadow:"",stackBackground:"#888"},thumbnailIcon:{padding:"5px",color:"#fff"},pagination:{background:"#eee",backgroundSelected:"#aaa",color:"#000",borderRadius:"2px",shapeBorder:"3px solid #666",shapeColor:"#444",shapeSelectedColor:"#aaa"}},c.viewerTheme_dark={background:"#000",barBackground:"rgba(4, 4, 4, 0.2)",barBorder:"0px solid #111",barColor:"#fff",barDescriptionColor:"#ccc"},c.viewerTheme_light={background:"#f8f8f8",barBackground:"rgba(4, 4, 4, 0.7)",barBorder:"0px solid #111",barColor:"#fff",barDescriptionColor:"#ccc"};var d=NGY2Tools.NanoAlert,m=NGY2Tools.NanoConsoleLog;function p(){c.VOM.items=[],c.VOM.albumID="0",c.GOM.curNavLevel="l1";for(var e=0,t=c.$E.base[0].src,n=void 0,i=0;i0?_e(n):m(c,"No content for Lightbox standalone.")}function g(e){var t={albumID:"0",imageID:"0"},n=e.split("/");return n.length>0&&(t.albumID=n[0],n.length>1&&(t.imageID=n[1])),t}function f(e,t){c.VOM.viewerDisplayed&&rt(null);var n=NGY2Item.GetIdx(c,t);c.GOM.curNavLevel="lN",0==n&&(c.GOM.curNavLevel="l1"),c.layout.SetEngine(),c.galleryResizeEventEnabled=!1,-1==n&&(NGY2Item.New(c,"","",t,"0","album"),n=c.I.length-1),c.I[n].contentIsLoaded?(be(),c.GOM.pagination.currentPage=0,ht(t,""),L(n)):te(t,f,e,t)}function b(){switch(c.galleryDisplayMode.Get()){case"PAGINATION":c.layout.support.rows&&c.galleryMaxRows.Get()>0&&function(){if(c.$E.conTnBottom.css("opacity",0),c.$E.conTnBottom.children().remove(),0==c.GOM.items.length)return;var e=Math.ceil((c.GOM.items[c.GOM.items.length-1].row+1)/c.galleryMaxRows.Get());if(1==e)return;c.GOM.pagination.currentPage>e-1&&(c.GOM.pagination.currentPage=e-1);if(S(),0==c.GOM.displayInterval.len)return;if("NUMBERS"==c.O.galleryPaginationMode&&c.GOM.pagination.currentPage>0){jQuery('").appendTo(c.$E.conTnBottom).click((function(e){M()}))}var t=0,n=e;if("NUMBERS"!=c.O.galleryPaginationMode)t=0;else{var i=c.O.paginationVisiblePages;if(i>=e)t=0;else{var a=0;a=i%2==1?(i+1)/2:i/2,c.GOM.pagination.currentPagee&&(n=e-1)):(t=c.GOM.pagination.currentPage-a,(n=t+i)>e&&(n=e-1)),n-t'+l+"").appendTo(c.$E.conTnBottom);s.data("pageNumber",o),s.click((function(e){c.GOM.pagination.currentPage=jQuery(this).data("pageNumber"),ut("pageChanged"),c.GOM.ScrollToTop(),V(),Y(!0)}))}if("NUMBERS"==c.O.galleryPaginationMode&&c.GOM.pagination.currentPage+1
"):t.$E.conConsole.append("nanogallery2: "+n+" ["+t.baseEltID+"]
"))},e.NanoConsoleLog=function(e,t){window.console&&console.log("nanogallery2: "+t+" ["+e.baseEltID+"]")},e.PreloaderDisplay=function(e){if(!0===e){if(this.$E.conLoadingB.removeClass("nanoGalleryLBarOff").addClass("nanoGalleryLBar"),null!=this.GOM.albumIdxLoading&&-1!=this.GOM.albumIdxLoading){this.I[this.GOM.albumIdxLoading].$Elts[".nGY2TnImg"].addClass("nGY2GThumbnailLoaderDisplayed")}}else if(this.$E.conLoadingB.removeClass("nanoGalleryLBar").addClass("nanoGalleryLBarOff"),null!=this.GOM.albumIdxLoading&&-1!=this.GOM.albumIdxLoading){this.I[this.GOM.albumIdxLoading].$Elts[".nGY2TnImg"].removeClass("nGY2GThumbnailLoaderDisplayed")}},e.AreaShuffle=function(e){for(var t,n,i=e.length;i;t=Math.floor(Math.random()*i),n=e[--i],e[i]=e[t],e[t]=n);return e},e.GetImageTitleFromURL=function(e){return"%filename"==this.O.thumbnailLabel.get("title")?e.split("/").pop().replace("_"," "):"%filenameNoExt"==this.O.thumbnailLabel.get("title")?e.split("/").pop().split(".").shift().replace("_"," "):""},e.AlbumPostProcess=function(t){var n=this.gallerySorting[this.GOM.curNavLevel],i=this.galleryMaxItems[this.GOM.curNavLevel];if(""!=n||i>0){var a=this.I.filter((function(e){return e.albumID==t&&"albumUp"!=e.kind}));switch(n){case"RANDOM":a=e.AreaShuffle(a);break;case"REVERSED":a=a.reverse();break;case"TITLEASC":a.sort((function(e,t){return e.title.toUpperCase()t.title.toUpperCase()?1:0}));break;case"TITLEDESC":a.sort((function(e,t){return e.title.toUpperCase()>t.title.toUpperCase()?-1:e.title.toUpperCase()0&&a.length>i&&a.splice(i-1,a.length-i),this.I.removeIf((function(e){return e.albumID==t&&"albumUp"!=e.kind})),this.I.push.apply(this.I,a)}},e}(),window.NGY2Item=function(){var e=1;function t(t){var n=0;n=null==t?e++:t,this.GetID=function(){return n},this.kind="",this.mediaKind="img",this.mediaMarkup="",this.G=null,this.title="",this.description="",this.albumID=0,this.src="",this.width=0,this.height=0,this.destinationURL="",this.downloadURL="",this.author="",this.left=0,this.top=0,this.width=0,this.height=0,this.resizedContentWidth=0,this.resizedContentHeight=0,this.thumbs={url:{l1:{xs:"",sm:"",me:"",la:"",xl:""},lN:{xs:"",sm:"",me:"",la:"",xl:""}},width:{l1:{xs:0,sm:0,me:0,la:0,xl:0},lN:{xs:0,sm:0,me:0,la:0,xl:0}},height:{l1:{xs:0,sm:0,me:0,la:0,xl:0},lN:{xs:0,sm:0,me:0,la:0,xl:0}}},this.thumbnailImgRevealed=!1,this.imageDominantColors=null,this.imageDominantColor=null,this.featured=!1,this.flickrThumbSizes={},this.picasaThumbs=null,this.hovered=!1,this.hoverInitDone=!1,this.contentIsLoaded=!1,this.contentLength=0,this.numberItems=0,this.mediaNumber=0,this.mediaCounter=0,this.eltTransform=[],this.eltFilter=[],this.eltEffect=[],this.paginationLastPage=0,this.paginationLastWidth=0,this.customData={},this.selected=!1,this.imageWidth=0,this.imageHeight=0,this.$elt=null,this.$Elts=[],this.tags=[],this.albumTagList=[],this.albumTagListSel=[],this.exif={exposure:"",flash:"",focallength:"",fstop:"",iso:"",model:"",time:"",location:""},this.deleted=!1,this.rotationAngle=0,this.$placeholder=null}t.Get=function(e,t){for(var n=e.I.length,i=0;ie.title===n);void 0!==t&&(n=t.replace)}if(-1!=r&&0!=r&&"image gallery by nanogallery2 [build]"!=n&&e.O.thumbnailLevelUp&&0==u.getContentLength(!1)&&""==e.O.album){let n=new t("0");e.I.push(n),u.contentLength+=1,n.title="UP",n.albumID=r,n.kind="albumUp",n.G=e,jQuery.extend(!0,n.thumbs.width,e.tn.defaultSize.width),jQuery.extend(!0,n.thumbs.height,e.tn.defaultSize.height)}var c=t.Get(e,o);null===c&&(c=new t(o),e.I.push(c),-1!=r&&"image gallery by nanogallery2 [build]"!=n&&(u.contentLength+=1)),c.G=e,c.albumID=r,c.kind=l,"image"==l&&(u.mediaCounter+=1,c.mediaNumber=u.mediaCounter);var h=e.O.thumbnailFeaturedKeyword;if(""!=h){h=h.toUpperCase();var d=n.toUpperCase().indexOf(h);d>-1&&(c.featured=!0,n=n.substring(0,d)+n.substring(d+h.length,n.length)),(d=i.toUpperCase().indexOf(h))>-1&&(c.featured=!0,i=i.substring(0,d)+i.substring(d+h.length,i.length))}if("string"==typeof e.galleryFilterTags.Get())switch(e.galleryFilterTags.Get().toUpperCase()){case"TITLE":{let e,t=/(?:^|\W)#(\w+)(?!\w)/g,i=[];for(;e=t.exec(n);)i.push(e[1].replace(/^\s*|\s*$/,""));c.setTags(i),n=n.split("#").join("");break}case"DESCRIPTION":{let e,t=/(?:^|\W)#(\w+)(?!\w)/g,n=[];for(;e=t.exec(i);)n.push(e[1].replace(/^\s*|\s*$/,""));c.setTags(n),i=i.split("#").join("");break}}else""!=s&&null!=s&&c.setTags(s.split(" "));return c.title=a(e,n),c.description=a(e,i),c},t.prototype.delete=function(){this.deleted=!0,this.G.I[t.GetIdx(this.G,this.albumID)].contentLength--,this.G.I[t.GetIdx(this.G,this.albumID)].numberItems--;for(var e=this.G.GOM.items.length,n=this.GetID(),i=-1,a=-1,o=0;o":">",'"':""","'":"'","/":"/","`":"`","=":"="};function a(e,t){return 1==e.O.allowHTMLinData?t:String(t).replace(/[&<>"'`=\/]/g,(function(e){return i[e]}))}function o(e,t){if("0"===(e=String(e))||1==t)return e;var n=Number(e.replace(/[a-zA-Z]/g,"")),i=e.match(/([^\-0-9\.]+)/g),a="";return null!=i&&i.length>0&&(a=i.join()),isNaN(n)||0==n?e:(n*=t)+a}return t.get_nextId=function(){return e},t.prototype.$getElt=function(e,t){return null==this.$elt?null:(void 0!==this.$Elts[e]&&1==!t||(this.$Elts[e]=".nGY2GThumbnail"==e?this.$elt:this.$elt.find(e)),this.$Elts[e])},t.prototype.removeElt=function(e){if(null!=this.$elt&&null!=this.$Elts[e]){this.$Elts[e].remove();var t=this.$Elts.indexOf(e);this.$Elts.splice(t,1)}},t.prototype.album=function(){return this.G.I[t.GetIdx(this.G,this.albumID)]},t.prototype.mediaTransition=function(){return this.G.O.viewerTransitionMediaKind.indexOf(this.mediaKind)>-1},t.prototype.imageSet=function(e,t,n){this.src=e,this.width=t,this.height=n},t.prototype.thumbSet=function(e,t,n,i,a){var o=["xs","sm","me","la","xl"];if(void 0===i||""==i||null==i)for(var r=0;r0){this.tags=e;for(var t=this.album().albumTagList,n=0;n0){if(this.G.O.thumbnailLevelUp&&"albumUp"==this.kind)return!0;var e=!1,t=this.album().albumTagListSel;if(0==t.length)return!0;for(var n=0;n=0)return!0;return!1},t.prototype.setMediaURL=function(e,t){this.src=e,this.mediaKind=t,"img"==t&&(this.mediaMarkup='')},t.prototype.isToDisplay=function(e){return this.albumID==e&&this.checkTagFilter()&&this.isSearchFound()&&this.isSearchTagFound()&&0==this.deleted},t.prototype.getContentLength=function(e){if(0==e||0==this.albumTagList.length||0==this.G.galleryFilterTags.Get())return this.contentLength;for(var t=this.G.I.length,n=0,i=this.GetID(),a=0;a=0;h--){var d="translateX("+o(t.translateX,i)+") translateY("+o(t.translateY,a)+") translateZ("+o(t.translateZ,r)+") scale("+o(t.scale,c)+") translate("+o(t.translate,1)+")";this.G.IE<=9||this.G.isGingerbread?d+=" rotate("+o(t.rotateZ,u)+")":d+=" rotateX("+o(t.rotateX,l)+") rotateY("+o(t.rotateY,s)+") rotateZ("+o(t.rotateZ,u)+") rotate("+o(t.rotate,1)+")",t.$elt[h].style[this.G.CSStransformName]=d,n>0&&(i-=this.G.tn.opt.Get("stacksTranslateX"),a-=this.G.tn.opt.Get("stacksTranslateY"),r-=this.G.tn.opt.Get("stacksTranslateZ"),l-=this.G.tn.opt.Get("stacksRotateX"),s-=this.G.tn.opt.Get("stacksRotateY"),u-=this.G.tn.opt.Get("stacksRotateZ"),c-=this.G.tn.opt.Get("stacksScale"))}else if(null!=t.$elt)for(h=0;h',thumbnailImage:'',breadcrumbAlbum:'',breadcrumbHome:'',breadcrumbSeparator:'',breadcrumbSeparatorRtl:'',navigationFilterSelected:'',navigationFilterUnselected:'',navigationFilterSelectedAll:'',navigationPaginationNext:'',navigationPaginationPrevious:'',navigationBtnOverlayNext:'',navigationBtnOverlayPrevious:'',thumbnailSelected:'',thumbnailUnselected:'',thumbnailFeatured:'',thumbnailCounter:'',thumbnailShare:'',thumbnailDownload:'',thumbnailInfo:'',thumbnailShoppingcart:'',thumbnailDisplay:'',thumbnailCustomTool1:"T1",thumbnailCustomTool2:"T2",thumbnailCustomTool3:"T3",thumbnailCustomTool4:"T4",thumbnailCustomTool5:"T5",thumbnailCustomTool6:"T6",thumbnailCustomTool7:"T7",thumbnailCustomTool8:"T8",thumbnailCustomTool9:"T9",thumbnailCustomTool10:"T10",thumbnailAlbumUp:'',paginationNext:'',paginationPrevious:'',galleryMoreButton:' ',buttonClose:'',viewerPrevious:'',viewerNext:'',viewerImgPrevious:'',viewerImgNext:'',viewerDownload:'',viewerToolbarMin:'',viewerToolbarStd:'',viewerPlay:'',viewerPause:'',viewerFullscreenOn:'',viewerFullscreenOff:'',viewerZoomIn:'',viewerZoomOut:'',viewerLinkOriginal:'',viewerInfo:'',viewerShare:'',viewerRotateLeft:'',viewerRotateRight:'',viewerShoppingcart:'',user:'',location:'',picture:'',config:'',shareFacebook:'',shareTwitter:'',shareTumblr:'',sharePinterest:'',shareVK:'',shareMail:'',viewerCustomTool1:"T1",viewerCustomTool2:"T2",viewerCustomTool3:"T3",viewerCustomTool4:"T4",viewerCustomTool5:"T5",viewerCustomTool6:"T6",viewerCustomTool7:"T7",viewerCustomTool8:"T8",viewerCustomTool9:"T9",viewerCustomTool10:"T10"}},jQuery.fn.nanogallery2=function(t,n,i){if(void 0===jQuery(this).data("nanogallery2data")){if("destroy"==t)return;return this.each((function(){new jQuery.nanogallery2(this,t)}))}var a=e(this).data("nanogallery2data").nG2;if(void 0===t||!0!==t.lightboxStandalone){switch(t){case"displayItem":a.DisplayItem(n);break;case"search":return a.Search(n);case"search2":return a.Search2(n,i);case"search2Execute":return a.Search2Execute();case"refresh":a.Refresh();break;case"resize":a.Resize();break;case"instance":return a;case"data":return a.data={items:a.I,gallery:a.GOM,lightbox:a.VOM,shoppingcart:a.shoppingCart},a.data;case"reload":return a.ReloadAlbum(),e(this);case"itemsSelectedGet":return a.ItemsSelectedGet();case"itemsSetSelectedValue":a.ItemsSetSelectedValue(n,i);break;case"option":if(void 0===i)return a.Get(n);a.Set(n,i),"demoViewportWidth"==n&&e(window).trigger("resize");break;case"destroy":a.Destroy(),e(this).removeData("nanogallery2data");break;case"shoppingCartGet":return a.shoppingCart;case"shoppingCartUpdate":if(void 0===i||void 0===n)return!1;for(var o=n,r=i,l=0;l0)){var i=!1;if(null!==this.allowList){for(a=0;a"+n+""):t.$E.conConsole.append("nanogallery2: "+n+" ["+t.baseEltID+"]
"))},e.NanoConsoleLog=function(e,t){window.console&&console.log("nanogallery2: "+t+" ["+e.baseEltID+"]")},e.PreloaderDisplay=function(e){if(!0===e){if(this.$E.conLoadingB.removeClass("nanoGalleryLBarOff").addClass("nanoGalleryLBar"),null!=this.GOM.albumIdxLoading&&-1!=this.GOM.albumIdxLoading){this.I[this.GOM.albumIdxLoading].$Elts[".nGY2TnImg"].addClass("nGY2GThumbnailLoaderDisplayed")}}else if(this.$E.conLoadingB.removeClass("nanoGalleryLBar").addClass("nanoGalleryLBarOff"),null!=this.GOM.albumIdxLoading&&-1!=this.GOM.albumIdxLoading){this.I[this.GOM.albumIdxLoading].$Elts[".nGY2TnImg"].removeClass("nGY2GThumbnailLoaderDisplayed")}},e.AreaShuffle=function(e){for(var t,n,i=e.length;i;t=Math.floor(Math.random()*i),n=e[--i],e[i]=e[t],e[t]=n);return e},e.GetImageTitleFromURL=function(e){return"%filename"==this.O.thumbnailLabel.get("title")?e.split("/").pop().replace("_"," "):"%filenameNoExt"==this.O.thumbnailLabel.get("title")?e.split("/").pop().split(".").shift().replace("_"," "):""},e.AlbumPostProcess=function(t){var n=this.gallerySorting[this.GOM.curNavLevel],i=this.galleryMaxItems[this.GOM.curNavLevel];if(""!=n||i>0){var a=this.I.filter((function(e){return e.albumID==t&&"albumUp"!=e.kind}));switch(n){case"RANDOM":a=e.AreaShuffle(a);break;case"REVERSED":a=a.reverse();break;case"TITLEASC":a.sort((function(e,t){return e.title.toUpperCase()t.title.toUpperCase()?1:0}));break;case"TITLEDESC":a.sort((function(e,t){return e.title.toUpperCase()>t.title.toUpperCase()?-1:e.title.toUpperCase()0&&a.length>i&&a.splice(i-1,a.length-i),this.I.removeIf((function(e){return e.albumID==t&&"albumUp"!=e.kind})),this.I.push.apply(this.I,a)}},e}(),window.NGY2Item=function(){var e=1;function t(t){var n=0;n=null==t?e++:t,this.GetID=function(){return n},this.kind="",this.mediaKind="img",this.mediaMarkup="",this.G=null,this.title="",this.description="",this.albumID=0,this.src="",this.width=0,this.height=0,this.destinationURL="",this.downloadURL="",this.author="",this.left=0,this.top=0,this.width=0,this.height=0,this.resizedContentWidth=0,this.resizedContentHeight=0,this.thumbs={url:{l1:{xs:"",sm:"",me:"",la:"",xl:""},lN:{xs:"",sm:"",me:"",la:"",xl:""}},width:{l1:{xs:0,sm:0,me:0,la:0,xl:0},lN:{xs:0,sm:0,me:0,la:0,xl:0}},height:{l1:{xs:0,sm:0,me:0,la:0,xl:0},lN:{xs:0,sm:0,me:0,la:0,xl:0}}},this.thumbnailImgRevealed=!1,this.imageDominantColors=null,this.imageDominantColor=null,this.featured=!1,this.flickrThumbSizes={},this.picasaThumbs=null,this.hovered=!1,this.hoverInitDone=!1,this.contentIsLoaded=!1,this.contentLength=0,this.numberItems=0,this.mediaNumber=0,this.mediaCounter=0,this.eltTransform=[],this.eltFilter=[],this.eltEffect=[],this.paginationLastPage=0,this.paginationLastWidth=0,this.customData={},this.selected=!1,this.imageWidth=0,this.imageHeight=0,this.$elt=null,this.$Elts=[],this.tags=[],this.albumTagList=[],this.albumTagListSel=[],this.exif={exposure:"",flash:"",focallength:"",fstop:"",iso:"",model:"",time:"",location:""},this.deleted=!1,this.rotationAngle=0}t.Get=function(e,t){for(var n=e.I.length,i=0;ie.title===n);void 0!==t&&(n=t.replace)}if(-1!=r&&0!=r&&"image gallery by nanogallery2 [build]"!=n&&e.O.thumbnailLevelUp&&0==u.getContentLength(!1)&&""==e.O.album){let n=new t("0");e.I.push(n),u.contentLength+=1,n.title="UP",n.albumID=r,n.kind="albumUp",n.G=e,jQuery.extend(!0,n.thumbs.width,e.tn.defaultSize.width),jQuery.extend(!0,n.thumbs.height,e.tn.defaultSize.height)}var c=t.Get(e,o);null===c&&(c=new t(o),e.I.push(c),-1!=r&&"image gallery by nanogallery2 [build]"!=n&&(u.contentLength+=1)),c.G=e,c.albumID=r,c.kind=l,"image"==l&&(u.mediaCounter+=1,c.mediaNumber=u.mediaCounter);var h=e.O.thumbnailFeaturedKeyword;if(""!=h){h=h.toUpperCase();var d=n.toUpperCase().indexOf(h);d>-1&&(c.featured=!0,n=n.substring(0,d)+n.substring(d+h.length,n.length)),(d=i.toUpperCase().indexOf(h))>-1&&(c.featured=!0,i=i.substring(0,d)+i.substring(d+h.length,i.length))}if("string"==typeof e.galleryFilterTags.Get())switch(e.galleryFilterTags.Get().toUpperCase()){case"TITLE":{let e,t=/(?:^|\W)#(\w+)(?!\w)/g,i=[];for(;e=t.exec(n);)i.push(e[1].replace(/^\s*|\s*$/,""));c.setTags(i),n=n.split("#").join("");break}case"DESCRIPTION":{let e,t=/(?:^|\W)#(\w+)(?!\w)/g,n=[];for(;e=t.exec(i);)n.push(e[1].replace(/^\s*|\s*$/,""));c.setTags(n),i=i.split("#").join("");break}}else""!=s&&null!=s&&c.setTags(s.split(" "));return c.title=a(e,n),c.description=a(e,i),c},t.prototype.delete=function(){this.deleted=!0,this.G.I[t.GetIdx(this.G,this.albumID)].contentLength--,this.G.I[t.GetIdx(this.G,this.albumID)].numberItems--;for(var e=this.G.GOM.items.length,n=this.GetID(),i=-1,a=-1,o=0;o":">",'"':""","'":"'","/":"/","`":"`","=":"="};function a(e,t){return 1==e.O.allowHTMLinData?t:String(t).replace(/[&<>"'`=\/]/g,(function(e){return i[e]}))}function o(e,t){if("0"===(e=String(e))||1==t)return e;var n=Number(e.replace(/[a-zA-Z]/g,"")),i=e.match(/([^\-0-9\.]+)/g),a="";return null!=i&&i.length>0&&(a=i.join()),isNaN(n)||0==n?e:(n*=t)+a}return t.get_nextId=function(){return e},t.prototype.$getElt=function(e,t){return null==this.$elt?null:(void 0!==this.$Elts[e]&&1==!t||(this.$Elts[e]=".nGY2GThumbnail"==e?this.$elt:this.$elt.find(e)),this.$Elts[e])},t.prototype.removeElt=function(e){if(null!=this.$elt&&null!=this.$Elts[e]){this.$Elts[e].remove();var t=this.$Elts.indexOf(e);this.$Elts.splice(t,1)}},t.prototype.album=function(){return this.G.I[t.GetIdx(this.G,this.albumID)]},t.prototype.mediaTransition=function(){return this.G.O.viewerTransitionMediaKind.indexOf(this.mediaKind)>-1},t.prototype.imageSet=function(e,t,n){this.src=e,this.width=t,this.height=n},t.prototype.thumbSet=function(e,t,n,i,a){var o=["xs","sm","me","la","xl"];if(void 0===i||""==i||null==i)for(var r=0;r0){this.tags=e;for(var t=this.album().albumTagList,n=0;n0){if(this.G.O.thumbnailLevelUp&&"albumUp"==this.kind)return!0;var e=!1,t=this.album().albumTagListSel;if(0==t.length)return!0;for(var n=0;n=0)return!0;return!1},t.prototype.setMediaURL=function(e,t){this.src=e,this.mediaKind=t,"img"==t&&(this.mediaMarkup='')},t.prototype.isToDisplay=function(e){return this.albumID==e&&this.checkTagFilter()&&this.isSearchFound()&&this.isSearchTagFound()&&0==this.deleted},t.prototype.getContentLength=function(e){if(0==e||0==this.albumTagList.length||0==this.G.galleryFilterTags.Get())return this.contentLength;for(var t=this.G.I.length,n=0,i=this.GetID(),a=0;a=0;h--){var d="translateX("+o(t.translateX,i)+") translateY("+o(t.translateY,a)+") translateZ("+o(t.translateZ,r)+") scale("+o(t.scale,c)+") translate("+o(t.translate,1)+")";this.G.IE<=9||this.G.isGingerbread?d+=" rotate("+o(t.rotateZ,u)+")":d+=" rotateX("+o(t.rotateX,l)+") rotateY("+o(t.rotateY,s)+") rotateZ("+o(t.rotateZ,u)+") rotate("+o(t.rotate,1)+")",t.$elt[h].style[this.G.CSStransformName]=d,n>0&&(i-=this.G.tn.opt.Get("stacksTranslateX"),a-=this.G.tn.opt.Get("stacksTranslateY"),r-=this.G.tn.opt.Get("stacksTranslateZ"),l-=this.G.tn.opt.Get("stacksRotateX"),s-=this.G.tn.opt.Get("stacksRotateY"),u-=this.G.tn.opt.Get("stacksRotateZ"),c-=this.G.tn.opt.Get("stacksScale"))}else if(null!=t.$elt)for(h=0;h',thumbnailImage:'',breadcrumbAlbum:'',breadcrumbHome:'',breadcrumbSeparator:'',breadcrumbSeparatorRtl:'',navigationFilterSelected:'',navigationFilterUnselected:'',navigationFilterSelectedAll:'',navigationPaginationPrevious:'',navigationPaginationNext:'',thumbnailSelected:'',thumbnailUnselected:'',thumbnailFeatured:'',thumbnailCounter:'',thumbnailShare:'',thumbnailDownload:'',thumbnailInfo:'',thumbnailShoppingcart:'',thumbnailDisplay:'',thumbnailCustomTool1:"T1",thumbnailCustomTool2:"T2",thumbnailCustomTool3:"T3",thumbnailCustomTool4:"T4",thumbnailCustomTool5:"T5",thumbnailCustomTool6:"T6",thumbnailCustomTool7:"T7",thumbnailCustomTool8:"T8",thumbnailCustomTool9:"T9",thumbnailCustomTool10:"T10",thumbnailAlbumUp:'',paginationNext:'',paginationPrevious:'',galleryMoreButton:' ',buttonClose:'',viewerPrevious:'',viewerNext:'',viewerImgPrevious:'',viewerImgNext:'',viewerDownload:'',viewerToolbarMin:'',viewerToolbarStd:'',viewerPlay:'',viewerPause:'',viewerFullscreenOn:'',viewerFullscreenOff:'',viewerZoomIn:'',viewerZoomOut:'',viewerLinkOriginal:'',viewerInfo:'',viewerShare:'',viewerRotateLeft:'',viewerRotateRight:'',viewerShoppingcart:'',user:'',location:'',picture:'',config:'',shareFacebook:'',shareTwitter:'',shareTumblr:'',sharePinterest:'',shareVK:'',shareMail:'',viewerCustomTool1:"T1",viewerCustomTool2:"T2",viewerCustomTool3:"T3",viewerCustomTool4:"T4",viewerCustomTool5:"T5",viewerCustomTool6:"T6",viewerCustomTool7:"T7",viewerCustomTool8:"T8",viewerCustomTool9:"T9",viewerCustomTool10:"T10"}},jQuery.fn.nanogallery2=function(t,n,i){if(void 0===jQuery(this).data("nanogallery2data")){if("destroy"==t)return;return this.each((function(){new jQuery.nanogallery2(this,t)}))}var a=e(this).data("nanogallery2data").nG2;if(void 0===t||!0!==t.lightboxStandalone){switch(t){case"displayItem":a.DisplayItem(n);break;case"search":return a.Search(n);case"search2":return a.Search2(n,i);case"search2Execute":return a.Search2Execute();case"refresh":a.Refresh();break;case"resize":a.Resize();break;case"instance":return a;case"data":return a.data={items:a.I,gallery:a.GOM,lightbox:a.VOM,shoppingcart:a.shoppingCart},a.data;case"reload":return a.ReloadAlbum(),e(this);case"itemsSelectedGet":return a.ItemsSelectedGet();case"itemsSetSelectedValue":a.ItemsSetSelectedValue(n,i);break;case"option":if(void 0===i)return a.Get(n);a.Set(n,i),"demoViewportWidth"==n&&e(window).trigger("resize");break;case"destroy":a.Destroy(),e(this).removeData("nanogallery2data");break;case"shoppingCartGet":return a.shoppingCart;case"shoppingCartUpdate":if(void 0===i||void 0===n)return!1;for(var o=n,r=i,l=0;l\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=e.console&&(e.console.warn||e.console.log);return o&&o.call(e.console,a,i),t.apply(this,arguments)}}a="function"!=typeof Object.assign?function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n-1}function I(e){return e.trim().split(/\s+/g)}function T(e,t,n){if(e.indexOf&&!n)return e.indexOf(t);for(var i=0;in[t]})):i.sort()),i}function L(e,t){for(var n,i,a=t[0].toUpperCase()+t.slice(1),r=0;r1&&!n.firstMultiple?n.firstMultiple=_(t):1===a&&(n.firstMultiple=!1);var o=n.firstInput,r=n.firstMultiple,l=r?r.center:o.center,c=t.center=$(i);t.timeStamp=u(),t.deltaTime=t.timeStamp-o.timeStamp,t.angle=B(l,c),t.distance=F(l,c),function(e,t){var n=t.center,i=e.offsetDelta||{},a=e.prevDelta||{},o=e.prevInput||{};1!==t.eventType&&4!==o.eventType||(a=e.prevDelta={x:o.deltaX||0,y:o.deltaY||0},i=e.offsetDelta={x:n.x,y:n.y});t.deltaX=a.x+(n.x-i.x),t.deltaY=a.y+(n.y-i.y)}(n,t),t.offsetDirection=P(t.deltaX,t.deltaY);var h=R(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=h.x,t.overallVelocityY=h.y,t.overallVelocity=s(h.x)>s(h.y)?h.x:h.y,t.scale=r?(d=r.pointers,m=i,F(m[0],m[1],N)/F(d[0],d[1],N)):1,t.rotation=r?function(e,t){return B(t[1],t[0],N)+B(e[1],e[0],N)}(r.pointers,i):0,t.maxPointers=n.prevInput?t.pointers.length>n.prevInput.maxPointers?t.pointers.length:n.prevInput.maxPointers:t.pointers.length,function(e,t){var n,i,a,o,r=e.lastInterval||t,l=t.timeStamp-r.timeStamp;if(8!=t.eventType&&(l>25||void 0===r.velocity)){var u=t.deltaX-r.deltaX,c=t.deltaY-r.deltaY,h=R(l,u,c);i=h.x,a=h.y,n=s(h.x)>s(h.y)?h.x:h.y,o=P(u,c),e.lastInterval=t}else n=r.velocity,i=r.velocityX,a=r.velocityY,o=r.direction;t.velocity=n,t.velocityX=i,t.velocityY=a,t.direction=o}(n,t);var d,m;var p=e.element;M(t.srcEvent.target,p)&&(p=t.srcEvent.target);t.target=p}(e,n),e.emit("hammer.input",n),e.recognize(n),e.session.prevInput=n}function _(e){for(var t=[],n=0;n=s(t)?e<0?2:4:t<0?8:16}function F(e,t,n){n||(n=V);var i=t[n[0]]-e[n[0]],a=t[n[1]]-e[n[1]];return Math.sqrt(i*i+a*a)}function B(e,t,n){n||(n=V);var i=t[n[0]]-e[n[0]],a=t[n[1]]-e[n[1]];return 180*Math.atan2(a,i)/Math.PI}Y.prototype={handler:function(){},init:function(){this.evEl&&y(this.element,this.evEl,this.domHandler),this.evTarget&&y(this.target,this.evTarget,this.domHandler),this.evWin&&y(C(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&G(this.element,this.evEl,this.domHandler),this.evTarget&&G(this.target,this.evTarget,this.domHandler),this.evWin&&G(C(this.element),this.evWin,this.domHandler)}};var z={mousedown:1,mousemove:2,mouseup:4};function H(){this.evEl="mousedown",this.evWin="mousemove mouseup",this.pressed=!1,Y.apply(this,arguments)}f(H,Y,{handler:function(e){var t=z[e.type];1&t&&0===e.button&&(this.pressed=!0),2&t&&1!==e.which&&(t=4),this.pressed&&(4&t&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:"mouse",srcEvent:e}))}});var U={pointerdown:1,pointermove:2,pointerup:4,pointercancel:8,pointerout:8},W={2:"touch",3:"pen",4:"mouse",5:"kinect"},X="pointerdown",j="pointermove pointerup pointercancel";function Q(){this.evEl=X,this.evWin=j,Y.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}e.MSPointerEvent&&!e.PointerEvent&&(X="MSPointerDown",j="MSPointerMove MSPointerUp MSPointerCancel"),f(Q,Y,{handler:function(e){var t=this.store,n=!1,i=e.type.toLowerCase().replace("ms",""),a=U[i],o=W[e.pointerType]||e.pointerType,r="touch"==o,l=T(t,e.pointerId,"pointerId");1&a&&(0===e.button||r)?l<0&&(t.push(e),l=t.length-1):12&a&&(n=!0),l<0||(t[l]=e,this.callback(this.manager,a,{pointers:t,changedPointers:[e],pointerType:o,srcEvent:e}),n&&t.splice(l,1))}});var q={touchstart:1,touchmove:2,touchend:4,touchcancel:8};function Z(){this.evTarget="touchstart",this.evWin="touchstart touchmove touchend touchcancel",this.started=!1,Y.apply(this,arguments)}function J(e,t){var n=x(e.touches),i=x(e.changedTouches);return 12&t&&(n=S(n.concat(i),"identifier",!0)),[n,i]}f(Z,Y,{handler:function(e){var t=q[e.type];if(1===t&&(this.started=!0),this.started){var n=J.call(this,e,t);12&t&&n[0].length-n[1].length==0&&(this.started=!1),this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:"touch",srcEvent:e})}}});var K={touchstart:1,touchmove:2,touchend:4,touchcancel:8};function ee(){this.evTarget="touchstart touchmove touchend touchcancel",this.targetIds={},Y.apply(this,arguments)}function te(e,t){var n=x(e.touches),i=this.targetIds;if(3&t&&1===n.length)return i[n[0].identifier]=!0,[n,n];var a,o,r=x(e.changedTouches),l=[],s=this.target;if(o=n.filter((function(e){return M(e.target,s)})),1===t)for(a=0;a-1&&i.splice(e,1)}),2500)}}function oe(e){for(var t=e.srcEvent.clientX,n=e.srcEvent.clientY,i=0;i-1&&this.requireFail.splice(t,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(e){return!!this.simultaneous[e.id]},emit:function(e){var t=this,n=this.state;function i(n){t.manager.emit(n,e)}n<8&&i(t.options.event+he(n)),i(t.options.event),e.additionalEvent&&i(e.additionalEvent),n>=8&&i(t.options.event+he(n))},tryEmit:function(e){if(this.canEmit())return this.emit(e);this.state=32},canEmit:function(){for(var e=0;et.threshold&&a&t.direction},attrTest:function(e){return pe.prototype.attrTest.call(this,e)&&(2&this.state||!(2&this.state)&&this.directionTest(e))},emit:function(e){this.pX=e.deltaX,this.pY=e.deltaY;var t=de(e.direction);t&&(e.additionalEvent=this.options.event+t),this._super.emit.call(this,e)}}),f(fe,pe,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return["none"]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.scale-1)>this.options.threshold||2&this.state)},emit:function(e){if(1!==e.scale){var t=e.scale<1?"in":"out";e.additionalEvent=this.options.event+t}this._super.emit.call(this,e)}}),f(be,ce,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return["auto"]},process:function(e){var t=this.options,n=e.pointers.length===t.pointers,i=e.distancet.time;if(this._input=e,!i||!n||12&e.eventType&&!a)this.reset();else if(1&e.eventType)this.reset(),this._timer=c((function(){this.state=8,this.tryEmit()}),t.time,this);else if(4&e.eventType)return 8;return 32},reset:function(){clearTimeout(this._timer)},emit:function(e){8===this.state&&(e&&4&e.eventType?this.manager.emit(this.options.event+"up",e):(this._input.timeStamp=u(),this.manager.emit(this.options.event,this._input)))}}),f(ve,pe,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return["none"]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.rotation)>this.options.threshold||2&this.state)}}),f(Oe,pe,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:30,pointers:1},getTouchAction:function(){return ge.prototype.getTouchAction.call(this)},attrTest:function(e){var t,n=this.options.direction;return 30&n?t=e.overallVelocity:6&n?t=e.overallVelocityX:24&n&&(t=e.overallVelocityY),this._super.attrTest.call(this,e)&&n&e.offsetDirection&&e.distance>this.options.threshold&&e.maxPointers==this.options.pointers&&s(t)>this.options.velocity&&4&e.eventType},emit:function(e){var t=de(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)}}),f(ye,ce,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return["manipulation"]},process:function(e){var t=this.options,n=e.pointers.length===t.pointers,i=e.distance\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=e.console&&(e.console.warn||e.console.log);return o&&o.call(e.console,a,i),t.apply(this,arguments)}}a="function"!=typeof Object.assign?function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n-1}function I(e){return e.trim().split(/\s+/g)}function T(e,t,n){if(e.indexOf&&!n)return e.indexOf(t);for(var i=0;in[t]})):i.sort()),i}function L(e,t){for(var n,i,a=t[0].toUpperCase()+t.slice(1),r=0;r1&&!n.firstMultiple?n.firstMultiple=$(t):1===a&&(n.firstMultiple=!1);var o=n.firstInput,r=n.firstMultiple,l=r?r.center:o.center,c=t.center=P(i);t.timeStamp=u(),t.deltaTime=t.timeStamp-o.timeStamp,t.angle=z(l,c),t.distance=F(l,c),function(e,t){var n=t.center,i=e.offsetDelta||{},a=e.prevDelta||{},o=e.prevInput||{};1!==t.eventType&&4!==o.eventType||(a=e.prevDelta={x:o.deltaX||0,y:o.deltaY||0},i=e.offsetDelta={x:n.x,y:n.y});t.deltaX=a.x+(n.x-i.x),t.deltaY=a.y+(n.y-i.y)}(n,t),t.offsetDirection=_(t.deltaX,t.deltaY);var h=R(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=h.x,t.overallVelocityY=h.y,t.overallVelocity=s(h.x)>s(h.y)?h.x:h.y,t.scale=r?(d=r.pointers,m=i,F(m[0],m[1],N)/F(d[0],d[1],N)):1,t.rotation=r?function(e,t){return z(t[1],t[0],N)+z(e[1],e[0],N)}(r.pointers,i):0,t.maxPointers=n.prevInput?t.pointers.length>n.prevInput.maxPointers?t.pointers.length:n.prevInput.maxPointers:t.pointers.length,function(e,t){var n,i,a,o,r=e.lastInterval||t,l=t.timeStamp-r.timeStamp;if(8!=t.eventType&&(l>25||void 0===r.velocity)){var u=t.deltaX-r.deltaX,c=t.deltaY-r.deltaY,h=R(l,u,c);i=h.x,a=h.y,n=s(h.x)>s(h.y)?h.x:h.y,o=_(u,c),e.lastInterval=t}else n=r.velocity,i=r.velocityX,a=r.velocityY,o=r.direction;t.velocity=n,t.velocityX=i,t.velocityY=a,t.direction=o}(n,t);var d,m;var p=e.element;M(t.srcEvent.target,p)&&(p=t.srcEvent.target);t.target=p}(e,n),e.emit("hammer.input",n),e.recognize(n),e.session.prevInput=n}function $(e){for(var t=[],n=0;n=s(t)?e<0?2:4:t<0?8:16}function F(e,t,n){n||(n=V);var i=t[n[0]]-e[n[0]],a=t[n[1]]-e[n[1]];return Math.sqrt(i*i+a*a)}function z(e,t,n){n||(n=V);var i=t[n[0]]-e[n[0]],a=t[n[1]]-e[n[1]];return 180*Math.atan2(a,i)/Math.PI}Y.prototype={handler:function(){},init:function(){this.evEl&&y(this.element,this.evEl,this.domHandler),this.evTarget&&y(this.target,this.evTarget,this.domHandler),this.evWin&&y(C(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&G(this.element,this.evEl,this.domHandler),this.evTarget&&G(this.target,this.evTarget,this.domHandler),this.evWin&&G(C(this.element),this.evWin,this.domHandler)}};var B={mousedown:1,mousemove:2,mouseup:4};function H(){this.evEl="mousedown",this.evWin="mousemove mouseup",this.pressed=!1,Y.apply(this,arguments)}f(H,Y,{handler:function(e){var t=B[e.type];1&t&&0===e.button&&(this.pressed=!0),2&t&&1!==e.which&&(t=4),this.pressed&&(4&t&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:"mouse",srcEvent:e}))}});var U={pointerdown:1,pointermove:2,pointerup:4,pointercancel:8,pointerout:8},W={2:"touch",3:"pen",4:"mouse",5:"kinect"},X="pointerdown",j="pointermove pointerup pointercancel";function Q(){this.evEl=X,this.evWin=j,Y.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}e.MSPointerEvent&&!e.PointerEvent&&(X="MSPointerDown",j="MSPointerMove MSPointerUp MSPointerCancel"),f(Q,Y,{handler:function(e){var t=this.store,n=!1,i=e.type.toLowerCase().replace("ms",""),a=U[i],o=W[e.pointerType]||e.pointerType,r="touch"==o,l=T(t,e.pointerId,"pointerId");1&a&&(0===e.button||r)?l<0&&(t.push(e),l=t.length-1):12&a&&(n=!0),l<0||(t[l]=e,this.callback(this.manager,a,{pointers:t,changedPointers:[e],pointerType:o,srcEvent:e}),n&&t.splice(l,1))}});var q={touchstart:1,touchmove:2,touchend:4,touchcancel:8};function Z(){this.evTarget="touchstart",this.evWin="touchstart touchmove touchend touchcancel",this.started=!1,Y.apply(this,arguments)}function J(e,t){var n=x(e.touches),i=x(e.changedTouches);return 12&t&&(n=S(n.concat(i),"identifier",!0)),[n,i]}f(Z,Y,{handler:function(e){var t=q[e.type];if(1===t&&(this.started=!0),this.started){var n=J.call(this,e,t);12&t&&n[0].length-n[1].length==0&&(this.started=!1),this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:"touch",srcEvent:e})}}});var K={touchstart:1,touchmove:2,touchend:4,touchcancel:8};function ee(){this.evTarget="touchstart touchmove touchend touchcancel",this.targetIds={},Y.apply(this,arguments)}function te(e,t){var n=x(e.touches),i=this.targetIds;if(3&t&&1===n.length)return i[n[0].identifier]=!0,[n,n];var a,o,r=x(e.changedTouches),l=[],s=this.target;if(o=n.filter((function(e){return M(e.target,s)})),1===t)for(a=0;a-1&&i.splice(e,1)}),2500)}}function oe(e){for(var t=e.srcEvent.clientX,n=e.srcEvent.clientY,i=0;i-1&&this.requireFail.splice(t,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(e){return!!this.simultaneous[e.id]},emit:function(e){var t=this,n=this.state;function i(n){t.manager.emit(n,e)}n<8&&i(t.options.event+he(n)),i(t.options.event),e.additionalEvent&&i(e.additionalEvent),n>=8&&i(t.options.event+he(n))},tryEmit:function(e){if(this.canEmit())return this.emit(e);this.state=32},canEmit:function(){for(var e=0;et.threshold&&a&t.direction},attrTest:function(e){return pe.prototype.attrTest.call(this,e)&&(2&this.state||!(2&this.state)&&this.directionTest(e))},emit:function(e){this.pX=e.deltaX,this.pY=e.deltaY;var t=de(e.direction);t&&(e.additionalEvent=this.options.event+t),this._super.emit.call(this,e)}}),f(fe,pe,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return["none"]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.scale-1)>this.options.threshold||2&this.state)},emit:function(e){if(1!==e.scale){var t=e.scale<1?"in":"out";e.additionalEvent=this.options.event+t}this._super.emit.call(this,e)}}),f(be,ce,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return["auto"]},process:function(e){var t=this.options,n=e.pointers.length===t.pointers,i=e.distancet.time;if(this._input=e,!i||!n||12&e.eventType&&!a)this.reset();else if(1&e.eventType)this.reset(),this._timer=c((function(){this.state=8,this.tryEmit()}),t.time,this);else if(4&e.eventType)return 8;return 32},reset:function(){clearTimeout(this._timer)},emit:function(e){8===this.state&&(e&&4&e.eventType?this.manager.emit(this.options.event+"up",e):(this._input.timeStamp=u(),this.manager.emit(this.options.event,this._input)))}}),f(ve,pe,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return["none"]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.rotation)>this.options.threshold||2&this.state)}}),f(Oe,pe,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:30,pointers:1},getTouchAction:function(){return ge.prototype.getTouchAction.call(this)},attrTest:function(e){var t,n=this.options.direction;return 30&n?t=e.overallVelocity:6&n?t=e.overallVelocityX:24&n&&(t=e.overallVelocityY),this._super.attrTest.call(this,e)&&n&e.offsetDirection&&e.distance>this.options.threshold&&e.maxPointers==this.options.pointers&&s(t)>this.options.velocity&&4&e.eventType},emit:function(e){var t=de(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)}}),f(ye,ce,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return["manipulation"]},process:function(e){var t=this.options,n=e.pointers.length===t.pointers,i=e.distance fractions
-- progressbar -> like left/right click
-- thumbnails without images, only html content
-
-*/
-
-
-
// Expose plugin as an AMD module if AMD loader is present:
(function (factory) {
"use strict";
@@ -328,7 +305,6 @@ ToDo:
let item = this.I[this.GOM.albumIdxLoading];
item.$Elts['.nGY2TnImg'].addClass('nGY2GThumbnailLoaderDisplayed');
}
-
}
else {
// loading bar at the top of the gallery
@@ -495,7 +471,6 @@ ToDo:
this.exif = { exposure: '', flash: '', focallength: '', fstop: '', iso: '', model: '', time: '', location: ''};
this.deleted = false; // item is deleted -> do not display anymore
this.rotationAngle = 0; // image display rotation angle
- this.$placeholder = null;
}
// public static
@@ -680,8 +655,8 @@ ToDo:
G.I[foundIdx].$elt.remove(); // delete thumbnail DOM object
}
G.GOM.items.splice(foundGOMidx, 1); // delete in GOM
- if( G.GOM.tn_with_counter.idx != -1 ) {
- G.GOM.tn_with_counter.idx -= 1;
+ if( G.GOM.lastDisplayedIdx != -1 ) {
+ G.GOM.lastDisplayedIdx -= 1;
}
}
@@ -1380,10 +1355,8 @@ ToDo:
galleryDisplayMoreStep : 2,
galleryDisplayMode : 'fullContent',
galleryL1DisplayMode : null,
- galleryPlaceholder: 'none',
galleryPaginationMode : 'rectangles', // 'dots', 'rectangles', 'numbers'
galleryPaginationTopButtons : true,
- galleryNavigationOverlayButtons: false,
galleryMaxRows : 2,
galleryL1MaxRows : null,
galleryLastRowFull: false,
@@ -1404,10 +1377,7 @@ ToDo:
galleryDisplayTransitionDuration : 1000,
galleryL1DisplayTransitionDuration : null,
galleryResizeAnimation : false,
- galleryRenderDelay : 10,
- galleryLimitedToContainer: false,
-
- gallerySliderElement: 'container',
+ galleryRenderDelay : 10,
thumbnailCrop : true,
thumbnailL1Crop : null,
@@ -1558,10 +1528,8 @@ ToDo:
navigationFilterSelected: '',
navigationFilterUnselected: '',
navigationFilterSelectedAll: '',
- navigationPaginationNext: '',
navigationPaginationPrevious: '',
- navigationBtnOverlayNext: '',
- navigationBtnOverlayPrevious: '',
+ navigationPaginationNext: '',
thumbnailSelected: '',
thumbnailUnselected: '',
thumbnailFeatured: '',
@@ -2129,9 +2097,6 @@ ToDo:
// Normally, the throttled function will run as much as it can, without ever going more than once per wait duration;
// but if you�d like to disable the execution on the leading edge, pass {leading: false}.
// To disable execution on the trailing edge, ditto.
-
-
-
var throttle = function(func, wait, options) {
var context, args, result;
var timeout = null;
@@ -2540,31 +2505,15 @@ ToDo:
G.GOM = {
albumIdx : -1, // index (in G.I) of the currently displayed album
clipArea : { top: 0, height: 0 }, // area of the GOM to display on screen
- layoutArea : { width: 0 , height: 0 }, // size of the full GOM area (=used area, not the available area)
- layoutAreaLast : { width: 0 , height: 0 }, // previous size of the GOM area
+ displayArea : { width: 0 , height: 0 }, // size of the GOM area (=used area, not available area)
+ displayAreaLast : { width: 0 , height: 0 }, // previous size of the GOM area
displayedMoreSteps : 0, // current number of displayed steps (moreButton mode)
- slider: {
- tweenable: [],
- left : {
- container: 0,
- thumbnails: 0,
- initial: 0
- },
- Left: function() {
- if( G.O.gallerySliderElement == 'container' ) {
- return this.left.container;
- }
- else {
- return this.left.thumbnails;
- }
- }
- },
- items: [], // array containing the current items of the GOMS
+ items: [], // current items of the GOMS
$imgPreloader: [],
thumbnails2Display: [],
- itemsDisplayed : 0, // number of currently displayed thumbnails
+ itemsDisplayed : 0, // number of currently displayed thumbnails
firstDisplay : true,
- firstDisplayTime : 0, // in conjunction with galleryRenderDelay
+ firstDisplayTime : 0, // in conjunction with galleryRenderDelay
navigationBar : { // content of the navigation bar (for breadcrumb, filter tags and next/previous pagination)
displayed: false,
$newContent: ''
@@ -2572,44 +2521,23 @@ ToDo:
cache : { // cached data
viewport: null,
containerOffset: null,
- areaWidth: 100 // available area width
+ areaWidth: 100 // available area width
},
nbSelected : 0, // number of selected items
- pagination: { // pagination data
- currentPage: 0
- },
+ pagination : { currentPage: 0 }, // pagination data
panThreshold: 60, // threshold value (in pixels) to block horizontal pan/swipe
panYOnly: false, // threshold value reach -> definitively block horizontal pan until end of pan
lastFullRow : -1, // number of the last row without holes
-
+ lastDisplayedIdx: -1, // used to display the counter of not displayed items
displayInterval : { from: 0, len: 0 },
hammertime: null,
- curNavLevel: 'l1', // current navigation level (l1 or LN)
+ curNavLevel: 'l1', // current navigation level (l1 or LN)
curWidth: 'me',
- albumSearch: '', // current search string -> title (used to filter the thumbnails on screen)
- albumSearchTags: '', // current search string -> tags
- lastZIndex: 0, // used to put a thumbnail on top of all others (for exemple for scale hover effect)
+ albumSearch: '', // current search string -> title (used to filter the thumbnails on screen)
+ albumSearchTags: '', // current search string -> tags
+ lastZIndex: 0, // used to put a thumbnail on top of all others (for exemple for scale hover effect)
lastRandomValue: 0,
- tn_with_counter: { // handling of the counter on the last displayed thumbnail
- idx: -1, // index of thumbnail hosting the counter
- idxNew: -1, // index of the new thumbnail hosting the counter
- Enabled: function() {
- if( G.layout.support.rows ) {
- switch( G.galleryDisplayMode.Get() ) {
- case 'ROWS':
- return true;
- break;
- case 'SLIDER':
- case 'FULLCONTENT':
- if( G.galleryMaxRows.Get() > 0 && G.GOM.lastFullRow != -1 ) {
- return true;
- }
- }
- }
- return false;
- }
- },
- tn_slider : { // slider on last thumbnail
+ slider : { // slider on last thumbnail
hostIdx: -1, // idx of the thumbnail hosting the slider
hostItem: null, // item hosting the slider
currentIdx: 0, // idx of the current displayed item
@@ -2637,7 +2565,7 @@ ToDo:
this.resizedContentHeight = 0;
this.displayed = false;
this.neverDisplayed = true;
- this.inDisplayInterval = false;
+ this.inDisplayArea = false;
},
// Position the top of the gallery to make it visible, if not displayed
ScrollToTop: function() {
@@ -3408,58 +3336,19 @@ ToDo:
}
}
-
-
- // --- Gallery pagination/slider next/previous
- if( (G.galleryDisplayMode.Get() == "PAGINATION" || G.galleryDisplayMode.Get() == "SLIDER" ) ) {
-
- if( G.layout.support.rows && G.galleryMaxRows.Get() > 0 ) {
-
- if( G.O.galleryPaginationTopButtons ) {
+ // --- Gallery pagination next/previous
+ if( G.galleryDisplayMode.Get() == "PAGINATION" && G.O.galleryPaginationTopButtons ) {
+ if( G.layout.support.rows && G.galleryMaxRows.Get() > 0 ) {
+ // ManagePagination( G.GOM.albumIdx );
var $newTagPrev = jQuery('').appendTo(G.GOM.navigationBar.$newContent);
$newTagPrev.click(function() {
- if( G.galleryDisplayMode.Get() == "PAGINATION" ) {
- paginationPreviousPage();
- }
- else {
- SliderMoveThrottled( 'previous' );
-
- }
+ paginationPreviousPage();
});
-
var $newTagNext = jQuery('').appendTo(G.GOM.navigationBar.$newContent);
$newTagNext.click(function() {
- if( G.galleryDisplayMode.Get() == "PAGINATION" ) {
- paginationNextPage();
- }
- else {
- SliderMoveThrottled( 'next' );
- }
- });
- }
-
-
- if( G.O.galleryNavigationOverlayButtons ) {
- var $newBtnPrevious = jQuery(''+G.O.icons.navigationBtnOverlayPrevious+'
').appendTo( G.$E.conTnParent );
- $newBtnPrevious.click(function() {
- if( G.galleryDisplayMode.Get() == "PAGINATION" ) {
- paginationPreviousPage();
- }
- else {
- SliderMoveThrottled( 'previous' );
- }
- });
- var $newBtnNext = jQuery(''+G.O.icons.navigationBtnOverlayNext+'
').appendTo( G.$E.conTnParent );
- $newBtnNext.click(function() {
- if( G.galleryDisplayMode.Get() == "PAGINATION" ) {
- paginationNextPage();
- }
- else {
- SliderMoveThrottled( 'next' );
- }
+ paginationNextPage();
});
}
- }
}
}
@@ -3694,196 +3583,8 @@ ToDo:
GalleryDisplayPart1();
GalleryDisplayPart2( true );
}
-
-
-
-
- function SliderAnimationForceFinish() {
- for( var i=0; i< G.GOM.slider.tweenable.length; i++ ) {
- if( G.GOM.slider.tweenable[i]._isTweening ) {
- // still sliding -> force tween finish
- G.GOM.slider.tweenable[i].stop(true);
- }
- }
- G.GOM.slider.tweenable = [];
- }
-
- // Move the slider (next/previous)
- var SliderMoveThrottled = throttle( SliderMove, 50, {leading: true, trailing: false});
- function SliderMove( direction ) {
- SliderAnimationForceFinish();
-
-
- if( G.GOM.layoutArea.width <= G.GOM.cache.areaWidth ) {
- return 0;
- }
-
- var dist = 0;
- // loop to find the left position of:
- // - the last not displayed item before the first displayed one
- // - the first displayed one
- // - the next displayed one
- // note: items are not sorted on their left position
- var nbTn = G.GOM.items.length;
- var previous_left = 0;
- var next_left = G.GOM.layoutArea.width;
- for( var i = 0; i < nbTn ; i++ ) {
- let curTn = G.GOM.items[i];
-
- if( (G.GOM.slider.Left() + curTn.left) < 0 ){
- if( curTn.left > previous_left ) {
- previous_left = curTn.left;
- }
- }
- if( (G.GOM.slider.Left() + curTn.left) > 0 ){
- if( curTn.left < next_left ) {
- next_left = curTn.left;
- }
- }
- }
-
- var current_left = -G.GOM.slider.Left();
- if( direction == 'previous' ) {
- dist = current_left - previous_left;
- // dist -= current_left + G.GOM.slider.container_left; // align the new first displayed thumbnails to the left border of the gallery container
- }
- else {
- dist = -(next_left - current_left);
- }
-
- SliderMove2( dist );
-
- }
-
- function SliderMove2( dist ) {
-
- var nbTn = G.GOM.items.length;
-
- // Adapt distance value
- var l = G.GOM.slider.Left();
- if( dist > 0 ) {
- // slide to left
- if( (l + dist) > 0 ) {
- dist = -l;
- }
- }
- else {
- // slide to right
- if( ( G.GOM.cache.areaWidth -l - dist) > G.GOM.layoutArea.width ) {
- dist = -(G.GOM.layoutArea.width - G.GOM.cache.areaWidth + l);
- }
- }
-
- if( dist == 0 ) { return; }
-
- if( G.O.gallerySliderElement == 'container' ) {
- // slide the thumbnails container
- var t = new NGTweenable();
- G.GOM.slider.tweenable.push( t );
- t.tween({
- from: { left: 0 },
- to: { left: dist },
- duration: 250,
- easing: 'easeOutBack', //'easeOutCubic',
- step: function (state, att) {
- G.$E.conTn.css('left', (G.GOM.slider.left.container + state.left) +'px');
- },
- finish: function (state, att) {
- G.$E.conTn.css('left', (G.GOM.slider.left.container + state.left) +'px');
- G.GOM.slider.left.container += state.left;
- // GalleryDisplayPart1();
- GalleryDisplayPart2( false );
- }
- });
- }
- else {
- // slide thumbnails grouped by columns
- var tns = []
-
- for( var i = 0; i < nbTn ; i++ ) {
- let curTn = G.GOM.items[i];
- if( curTn.displayed ) {
- tns.push(curTn);
- }
- }
-
-
- if( tns.length > 0 ) {
- var tab = []; // left positions
- var cols = []; // columns
- for( var i = 0; i < tns.length ; i++ ) {
- if( tab[tns[i].left] == undefined ) {
- tab[tns[i].left] = [];
- cols.push( tns[i].left );
- }
- tab[tns[i].left].push( tns[i] );
- }
- cols = cols.sort(function(a, b){return a-b}); // sort in ascending order
-
- if( G.O.gallerySliderElement == 'thumbnailsPush' && dist < 0 ) {
- // <0 = push
- // >0 = pull
- cols = cols.reverse();
- }
-
- // translate each thumbnail to his new position
- for( var i = 0; i < cols.length; i++ ) {
- var t = new NGTweenable();
- G.GOM.slider.tweenable.push( t );
- t.tween({
- from: { left: 0 },
- to: { left: dist },
- duration: 250,
- delay: i * 25,
- easing: 'easeOutBack', //'easeOutCubic',
- attachment: { tns: tab[cols[i]], isLast: false },
- step: function (state, att) {
-
- att.tns.forEach(function(tn){
- var item = G.I[tn.thumbnailIdx];
- item.$elt.css({ left: item.left + G.GOM.slider.left.thumbnails + state.left });
- });
-
- },
- finish: function (state, att) {
- att.tns.forEach(function(tn){
- var item = G.I[tn.thumbnailIdx];
- item.$elt.css({ left: item.left + G.GOM.slider.left.thumbnails + state.left });
- });
- if( att.isLast ) {
- G.GOM.slider.left.thumbnails += state.left;
- // GalleryDisplayPart1();
- GalleryDisplayPart2( false );
- }
- }
- });
- }
-
- // last animation: enable following procedures
- G.GOM.slider.tweenable[G.GOM.slider.tweenable.length-1]._attachment.isLast = true;
- }
- }
- }
-
-
- // Slider pan left/right (gesture/mouse)
- var SliderPanThrottled = throttle( SliderPan, 100, {leading: true, trailing: false});
- function SliderPan( deltaX ) {
-
- SliderAnimationForceFinish();
-
- var d = -(G.GOM.slider.Left() -(G.GOM.slider.left.initial + deltaX));
-
- if( d != 0 ) {
- SliderMove2( d );
- }
-
- }
-
-
-
- // retrieve the from/to interval for gallery thumbnail render
+ // retrieve the from/to intervall for gallery thumbnail render
function GalleryRenderGetInterval() {
G.GOM.displayInterval.from = 0;
G.GOM.displayInterval.len = G.I.length;
@@ -3940,9 +3641,8 @@ ToDo:
}
break;
default:
- case 'SLIDER':
case 'FULLCONTENT':
- if( G.layout.support.rows && G.galleryLastRowFull.Get() && G.GOM.lastFullRow != -1 ) {
+ if( G.layout.support.rows && G.galleryLastRowFull.Get() && G.GOM.lastFullRow != -1 ) {
let nbTn = G.GOM.items.length;
let lastRow = G.GOM.lastFullRow + 1;
G.GOM.displayInterval.len = 0;
@@ -3961,8 +3661,8 @@ ToDo:
// RENDER THE GALLERY
function GalleryRender( albumIdx ) {
TriggerCustomEvent('galleryRenderStart');
- clearTimeout(G.GOM.tn_slider.timerID);
- G.GOM.tn_slider.hostIdx = -1; // disabled slider on thumbnail
+ clearTimeout(G.GOM.slider.timerID);
+ G.GOM.slider.hostIdx = -1; // disabled slider on thumbnail
var fu=G.O.fnGalleryRenderStart;
if( fu !== null ) {
@@ -3973,7 +3673,7 @@ ToDo:
G.layout.SetEngine();
G.galleryResizeEventEnabled = false;
G.GOM.albumIdx = -1;
- G.GOM.tn_with_counter.idx = -1;
+ G.GOM.lastDisplayedIdx = -1;
// pagination
if( G.$E.conTnBottom !== undefined ) {
@@ -3983,11 +3683,6 @@ ToDo:
// navigation toolbar (breadcrumb + tag filters + pagination next/previous)
GalleryNavigationBar(albumIdx);
-
- // hide overlay next/previous buttons
- G.$E.conTnParent.addClass('nGY2GalleryBtnOverlayHidden');
-
-
if( G.GOM.firstDisplay ) {
// first gallery display
@@ -4100,18 +3795,7 @@ ToDo:
item.resizedContentWidth = 0;
item.resizedContentHeight = 0;
item.thumbnailImgRevealed = false;
- item.displayed = false;
- item.neverDisplayed = true;
- item.$placeholder = [];
}
-
- // re-init pagination
- G.GOM.pagination.currentPage = 0;
- // slider
- G.GOM.slider.left.container = 0;
- G.GOM.slider.left.thumbnails = 0;
- G.$E.conTn.css('left', 'auto');
-
if( G.CSStransformName == null ) {
G.$E.conTn.css('left', '0px');
@@ -4297,12 +3981,11 @@ ToDo:
var r = true;
// width of the available area
G.GOM.cache.areaWidth = G.$E.conTnParent.width();
- G.GOM.layoutArea.width = 0;
- G.GOM.layoutArea.height = 0;
+ G.GOM.displayArea = { width:0, height:0 };
switch( G.layout.engine ) {
case 'JUSTIFIED':
- r = GallerySetLayoutJustified();
+ r = GallerySetLayoutWidthtAuto();
break;
case 'CASCADING':
r = GallerySetLayoutHeightAuto();
@@ -4429,13 +4112,13 @@ ToDo:
}
}
- G.GOM.layoutArea.width= maxCol * (tnWidth + gutterWidth) - gutterWidth;
+ G.GOM.displayArea.width= maxCol * (tnWidth + gutterWidth) - gutterWidth;
return true;
}
//----- JUSTIFIED LAYOUT
- function GallerySetLayoutJustified() {
+ function GallerySetLayoutWidthtAuto() {
var curWidth = 0,
areaWidth = G.GOM.cache.areaWidth,
lastPosX = 0,
@@ -4459,27 +4142,6 @@ ToDo:
var nbTnInCurrRow = 1;
var nbTn = G.GOM.items.length;
-
-
- if( G.galleryDisplayMode.Get() == 'SLIDER' ) {
- // mode slider -> evaluate the width of the container
- for( var i = 0; i < nbTn ; i++ ) {
- let curTn = G.GOM.items[i];
- if( curTn.imageWidth > 0 ) {
- let imageRatio = curTn.imageWidth / curTn.imageHeight;
- let imageWidth = Math.floor( tnHeight * imageRatio );
-
- curWidth += imageWidth + gutterWidth;
- }
- }
- curWidth -= gutterWidth;
- var nb_rows = G.galleryMaxRows.Get() > 0 ? G.galleryMaxRows.Get() : 1;
- areaWidth = curWidth / nb_rows;
- curWidth = 0;
- }
-
-
-
// first loop --> retrieve each row image height
for( var i = 0; i < nbTn ; i++ ) {
let curTn = G.GOM.items[i];
@@ -4519,7 +4181,7 @@ ToDo:
rowLastItem[rowNum] = i;
}
else {
- // new row after current item --> we need to adjust the row height to have enough space for the current thumbnail
+ // new row after current item --> we need to adujet the row height to have enough space for the current thumbnail
curWidth += gutterWidth+imageWidth;
let ratio = (areaWidth - nbTnInCurrRow * borderWidth) / curWidth;
let rH = Math.floor(tnHeight * ratio);
@@ -4547,7 +4209,7 @@ ToDo:
lastPosX = 0;
cnt = 0;
- G.GOM.lastFullRow = 0; // display at least 1 row (even if not full)
+ G.GOM.lastFullRow = 0; // display at leat 1 row (even if not full)
// second loop --> calculate each thumbnail size
for( var i = 0; i < nbTn ; i++ ) {
@@ -4644,7 +4306,7 @@ ToDo:
}
}
- G.GOM.layoutArea.width = areaWidth;
+ G.GOM.displayArea.width = areaWidth;
return true;
}
@@ -4663,9 +4325,9 @@ ToDo:
var row = 0;
var h = 0;
var n = 0;
- var max_patterns_per_row = 1;
- // first loop: evaluate the gallery width based on the content of the first pattern instance
+
+ // first loop: evaluate the gallery width based on the first row
var nbCols = 0;
var maxW = 0;
let mosaicPattern = G.tn.settings.getMosaic();
@@ -4681,48 +4343,17 @@ ToDo:
n++;
if( n >= mosaicPattern.length ) {
- // end of the pattern
+ // end of pattern
break;
}
}
var totalGutterWidth = (nbCols - 1) * gutterWidth;
- var scaleFactor = (areaWidth - totalGutterWidth ) / ( maxW - totalGutterWidth );
-
- // scaled --> evaluate scale factor and number of columns
- if( scaleFactor > 1 ) {
- if( G.O.thumbnailAlignment == 'fillWidth' ) {
- // scale down to display another pattern on the same row
- max_patterns_per_row = Math.ceil(areaWidth / maxW);
- var max_patterns = Math.ceil(nbTn / mosaicPattern.length);
- max_patterns_per_row = Math.min(max_patterns_per_row, max_patterns)
- var totalGutterWidth2 = (max_patterns_per_row-1) * gutterWidth;
- scaleFactor = (areaWidth - totalGutterWidth2 ) / ( (maxW*max_patterns_per_row) );
- }
- else {
- // no upscale to avoid blurred images
- scaleFactor = 1;
- }
- }
+ var scaleFactor = Math.min( (areaWidth - totalGutterWidth ) / ( maxW - totalGutterWidth ), 1);
- if( G.galleryDisplayMode.Get() == 'SLIDER' ) {
- if( G.galleryLastRowFull.Get() ) {
- max_patterns_per_row = Math.floor(nbTn / mosaicPattern.length);
- }
- else {
- max_patterns_per_row = Math.ceil(nbTn / mosaicPattern.length);
- }
- var nb_rows = G.galleryMaxRows.Get() > 0 ? G.galleryMaxRows.Get() : 1;
- max_patterns_per_row = Math.ceil(max_patterns_per_row / nb_rows);
- }
-
-
- // Loop for positioning all the thumbnails based on the layout pattern
+ // second loop: position all the thumbnails based on the layout pattern
row = 0;
n = 0;
- var used_width = 0;
- maxW = 0;
- var cnt_hor_patterns = 0;
- var base_left = 0;
+ // let mosaicPattern = G.tn.settings.getMosaic();
for( var i = 0; i < nbTn ; i++ ) {
let curTn = G.GOM.items[i];
let curPatternElt = mosaicPattern[n];
@@ -4733,46 +4364,27 @@ ToDo:
}
curTn.left = (curPatternElt.c - 1) * Math.round(G.tn.defaultSize.getOuterWidth()*scaleFactor) + (curPatternElt.c - 1) * gutterWidth;
-
+
curTn.height = Math.round(curPatternElt.h * G.tn.defaultSize.getOuterHeight() * scaleFactor) + (curPatternElt.h - 1) * gutterHeight + (G.tn.labelHeight.get() * curPatternElt.h);
curTn.resizedContentHeight = curTn.height - G.tn.labelHeight.get() - borderHeight;
curTn.width = Math.round(curPatternElt.w * G.tn.defaultSize.getOuterWidth()*scaleFactor) + (curPatternElt.w - 1) * gutterWidth;
curTn.resizedContentWidth = curTn.width - borderWidth ;
- maxW = Math.max(maxW, curTn.left + curTn.width );
-
- curTn.left += base_left;
- used_width = Math.max(used_width, curTn.left + curTn.width);
-
curTn.row = row;
if( row == 0 ) {
- h = Math.max(h, curTn.top + curTn.height);
+ h=Math.max(h, curTn.top + curTn.height);
}
n++;
if( n >= mosaicPattern.length ) {
- // end pattern -> new one
+ // end pattern -> new line
n = 0;
-
- cnt_hor_patterns++;
- if( cnt_hor_patterns >= max_patterns_per_row ) {
- // new row
- cnt_hor_patterns = 0;
- row++;
- }
-
- base_left = cnt_hor_patterns * ( maxW + gutterWidth );
-
+ row++;
}
}
-
- G.GOM.lastFullRow = row;
- if( Math.floor( nbTn / mosaicPattern.length) < Math.ceil( nbTn / mosaicPattern.length) ) {
- G.GOM.lastFullRow--;
- }
- G.GOM.layoutArea.width = used_width;
+ G.GOM.displayArea.width = (maxW - totalGutterWidth) * scaleFactor + totalGutterWidth;
return true;
}
@@ -4795,9 +4407,9 @@ ToDo:
var nbTn= G.GOM.items.length;
var borderWidth = G.tn.opt.Get('borderHorizontal') * 2;
var borderHeight = G.tn.opt.Get('borderVertical') * 2;
-
+
// retrieve gutter width
- if( G.O.thumbnailAlignment == 'justified' && G.galleryDisplayMode.Get() != 'SLIDER' ) {
+ if( G.O.thumbnailAlignment == 'justified' ) {
maxCol = Math.min( maxCol, nbTn);
gutterWidth = (maxCol==1 ? 0 : (areaWidth-(maxCol*tnWidth))/(maxCol-1));
}
@@ -4805,39 +4417,26 @@ ToDo:
gutterWidth = G.tn.settings.GetResponsive('gutterWidth');
}
- // scaled --> evaluate scale factor and number of columns
+ // first loop to retrieve the real used width of the area (the evaluation is based on the content of the first line)
+ // Retrieve the real used width of the area (the evaluation is based on the content of the first line)
if( G.O.RTL || G.O.thumbnailAlignment == 'fillWidth' ) {
+ // scaled --> evaluate scale factor and number of columns
var totalGutterWidth = (maxCol-1) * gutterWidth;
scaleFactor = (areaWidth - totalGutterWidth) / (maxCol*tnWidth);
if( scaleFactor > 1 ) {
- // no upscale to avoid blurry images
maxCol++; // add one column and re-evaluate the scale factor
}
totalGutterWidth = (maxCol-1) * gutterWidth;
- scaleFactor = Math.min( (areaWidth - totalGutterWidth) / (maxCol*tnWidth), 1);
- tnWidth = Math.round(tnWidth * scaleFactor);
- }
-
-
-
- if( G.galleryDisplayMode.Get() == 'SLIDER' ) {
- var nb_rows = G.galleryMaxRows.Get() > 0 ? G.galleryMaxRows.Get() : 1;
- maxCol = Math.round( nbTn / nb_rows );
- var totalGutterWidth = (maxCol-1) * gutterWidth;
+ scaleFactor = Math.min( (areaWidth - totalGutterWidth) / (maxCol*tnWidth), 1); // no upscale
newAreaWidth = (maxCol*tnWidth) + totalGutterWidth;
- if( newAreaWidth < areaWidth ) {
- nb_rows--;
- maxCol = Math.round( nbTn / nb_rows );
- totalGutterWidth = (maxCol-1) * gutterWidth;
- newAreaWidth = (maxCol*tnWidth) + totalGutterWidth;
- }
}
-
- G.GOM.lastFullRow = 0 ; // display at least 1 row (even if not full)
+
+ G.GOM.lastFullRow = 0 ; // display at leat 1 row (even if not full)
// var lastPosY = 0;
var row = 0;
+ tnWidth = Math.round(tnWidth * scaleFactor);
var contentWidth = tnWidth - borderWidth;
var tnHeight = Math.round(G.tn.defaultSize.getOuterHeight() * scaleFactor) + G.tn.labelHeight.get();
var contentHeight = Math.round( G.tn.defaultSize.getOuterHeight() * scaleFactor) - borderHeight;
@@ -4881,7 +4480,7 @@ ToDo:
row++;
}
}
- G.GOM.layoutArea.width = w;
+ G.GOM.displayArea.width = w;
return true;
}
@@ -4926,13 +4525,12 @@ ToDo:
var cnt = 0; // counter for delay between each thumbnail display
- // retrieve the interval of objects from the full collection of objects
GalleryRenderGetInterval();
for( var i = 0; i < nbTn ; i++ ) {
let curTn = G.GOM.items[i];
if( i >= G.GOM.displayInterval.from && cnt < G.GOM.displayInterval.len ) {
- curTn.inDisplayInterval = true;
+ curTn.inDisplayArea = true;
if( forceTransition ) {
curTn.neverDisplayed = true;
}
@@ -4940,7 +4538,7 @@ ToDo:
cnt++;
}
else{
- curTn.inDisplayInterval = false;
+ curTn.inDisplayArea = false;
}
}
@@ -4949,7 +4547,7 @@ ToDo:
var tnToDisplay = [];
var tnToReDisplay = [];
-
+
CacheViewport();
G.GOM.clipArea.top = -1;
cnt = 0 ;
@@ -4958,19 +4556,7 @@ ToDo:
// NOTE: loop always the whole GOM.items --> in case an already displayed thumbnail needs to be removed
for( var i = 0; i < nbTn ; i++ ) {
let curTn = G.GOM.items[i];
-
-
- // Display thumbnails placeholders
- if( G.O.galleryPlaceholder != 'none' ) {
- if( curTn.$placeholder == null ) {
- curTn.$placeholder = jQuery('').appendTo(G.$E.conTn);
- }
- curTn.$placeholder.css({ top: curTn.top, left: curTn.left + G.GOM.slider.left.thumbnails, width: curTn.width, height: curTn.height });
- }
-
-
-
- if( curTn.inDisplayInterval ) {
+ if( curTn.inDisplayArea ) {
if( G.GOM.clipArea.top == -1 ) {
G.GOM.clipArea.top = curTn.top;
}
@@ -4981,55 +4567,25 @@ ToDo:
G.GOM.clipArea.height = Math.max( G.GOM.clipArea.height, curTn.top-G.GOM.clipArea.top + curTn.height);
- var tn_in_visible_area = false;
-
- // Vertical check in VIEWPORT
- // thumbnail is not displayed -> check if in viewport to display or not
- var top = G.GOM.cache.containerOffset.top + (curTn.top - G.GOM.clipArea.top);
- // var left=containerOffset.left+curTn.left;
- if( (top + curTn.height) >= (G.GOM.cache.viewport.t - threshold) && top <= (G.GOM.cache.viewport.t + G.GOM.cache.viewport.h + threshold) ) {
- tn_in_visible_area = true;
- }
-
- // Horizontal check (only in slider mode)
- // check if in gallery container
- if( G.galleryDisplayMode.Get() == "SLIDER"
- && ( ((curTn.left+G.GOM.slider.Left() ) > G.GOM.cache.areaWidth ) || (curTn.left+curTn.width+ G.GOM.slider.Left() ) < 0 )
- ){
- tn_in_visible_area = false;
- }
-
- if( tn_in_visible_area ) {
- if( curTn.neverDisplayed ) {
+ if( curTn.neverDisplayed ) {
+ // thumbnail is not displayed -> check if in viewport to display or not
+ var top = G.GOM.cache.containerOffset.top + (curTn.top - G.GOM.clipArea.top);
+ // var left=containerOffset.left+curTn.left;
+ if( (top + curTn.height) >= (G.GOM.cache.viewport.t - threshold) && top <= (G.GOM.cache.viewport.t + G.GOM.cache.viewport.h + threshold) ) {
// build thumbnail
let item = G.I[curTn.thumbnailIdx];
if( item.$elt == null ) {
// ThumbnailBuild( item, curTn.thumbnailIdx, i, (i+1) == nbTn );
ThumbnailBuild( item, curTn.thumbnailIdx, i );
}
- // Display thumbnail with animation
tnToDisplay.push({idx:i, delay:cnt, top: curTn.top, left: curTn.left});
cnt++;
}
- else {
- // Display without animation
- tnToReDisplay.push({idx: i, delay: 0, top: curTn.top, left: curTn.left});
- }
}
else {
- if( curTn.displayed ) {
- curTn.displayed = false;
- if( G.galleryDisplayMode.Get() == "SLIDER" ) {
- curTn.neverDisplayed = true; // force to re-display with animation
- }
- let item = G.I[curTn.thumbnailIdx];
- if( item.$elt != null ){
- item.$elt.css({ opacity: 0, display: 'none' });
- }
- }
-
+ tnToReDisplay.push({idx: i, delay: 0, top: curTn.top, left: curTn.left});
}
-
+ // G.GOM.itemsDisplayed++;
lastTnIdx = i;
}
else {
@@ -5039,19 +4595,17 @@ ToDo:
item.$elt.css({ opacity: 0, display: 'none' });
}
}
-
}
-
var areaWidth = G.$E.conTnParent.width();
// set gallery area really used size
- // if( G.GOM.layoutArea.width != G.GOM.layoutAreaLast.width || G.GOM.layoutArea.height != G.GOM.layoutAreaLast.height ) {
- if( G.GOM.layoutArea.width != G.GOM.layoutAreaLast.width || G.GOM.clipArea.height != G.GOM.layoutAreaLast.height ) {
- G.$E.conTn.width( G.GOM.layoutArea.width ).height( G.GOM.clipArea.height );
- G.GOM.layoutAreaLast.width = G.GOM.layoutArea.width;
- G.GOM.layoutAreaLast.height = G.GOM.clipArea.height;
- // G.GOM.layoutAreaLast.height=G.GOM.layoutArea.height-G.GOM.clipArea.top;
+ // if( G.GOM.displayArea.width != G.GOM.displayAreaLast.width || G.GOM.displayArea.height != G.GOM.displayAreaLast.height ) {
+ if( G.GOM.displayArea.width != G.GOM.displayAreaLast.width || G.GOM.clipArea.height != G.GOM.displayAreaLast.height ) {
+ G.$E.conTn.width( G.GOM.displayArea.width ).height( G.GOM.clipArea.height );
+ G.GOM.displayAreaLast.width = G.GOM.displayArea.width;
+ G.GOM.displayAreaLast.height = G.GOM.clipArea.height;
+ // G.GOM.displayAreaLast.height=G.GOM.displayArea.height-G.GOM.clipArea.top;
}
if( areaWidth != G.$E.conTnParent.width() ) {
@@ -5064,20 +4618,20 @@ ToDo:
return;
}
-
- // Counter of the not displayed thumbnails (is displayed over the last thumbnail)
- if( G.GOM.tn_with_counter.Enabled() ) {
- // if( lastTnIdx != -1 && lastTnIdx < (nbTn - 1) ) {
- if( lastTnIdx < (nbTn - 1) ) {
- G.GOM.tn_with_counter.idxNew = lastTnIdx;
- }
- else {
- G.GOM.tn_with_counter.idxNew =- 1;
- }
- // remove last displayed counter
- if( G.GOM.tn_with_counter.idx != -1 ) {
- let item = G.I[G.GOM.items[G.GOM.tn_with_counter.idx].thumbnailIdx];
- item.$getElt('.nGY2GThumbnailIconsFullThumbnail').html('');
+ // counter of not displayed images (is displayed on the last thumbnail)
+ if( G.layout.support.rows ) {
+ if( G.galleryDisplayMode.Get() == 'ROWS' || (G.galleryDisplayMode.Get() == 'FULLCONTENT' && G.galleryLastRowFull.Get() && G.GOM.lastFullRow != -1) ){
+ if( lastTnIdx < (nbTn - 1) ) {
+ G.GOM.lastDisplayedIdxNew = lastTnIdx;
+ }
+ else {
+ G.GOM.lastDisplayedIdxNew =- 1;
+ }
+ // remove last displayed counter
+ if( G.GOM.lastDisplayedIdx != -1 ) {
+ let item = G.I[G.GOM.items[G.GOM.lastDisplayedIdx].thumbnailIdx];
+ item.$getElt('.nGY2GThumbnailIconsFullThumbnail').html('');
+ }
}
}
@@ -5085,7 +4639,7 @@ ToDo:
// batch set position (and display animation) to all thumbnails
// first display newly built thumbnails
- G.GOM.thumbnails2Display = [];
+ G.GOM.thumbnails2Display=[];
var duration = ThumbnailPreparePosition( tnToDisplay );
ThumbnailPreparePosition( tnToReDisplay );
@@ -5095,17 +4649,14 @@ ToDo:
if( G.tn.opt.Get('displayTransition') == 'NONE' ) {
G.galleryResizeEventEnabled = true;
// GalleryThumbnailSliderBuildAndStart(); // image slider on last displayed thumbnail
- G.$E.conTnParent.removeClass('nGY2GalleryBtnOverlayHidden'); // display gallery overlay for next/previous buttons
-
TriggerCustomEvent('galleryDisplayed');
}
else {
// setTimeout(function() {
requestTimeout( function() {
- // change value after the end of the display transition of the newly built thumbnails
+ // change value after the end of the display transistion of the newly built thumbnails
G.galleryResizeEventEnabled = true;
// GalleryThumbnailSliderBuildAndStart(); // image slider on last displayed thumbnail
- G.$E.conTnParent.removeClass('nGY2GalleryBtnOverlayHidden'); // display gallery overlay for next/previous buttons
TriggerCustomEvent('galleryDisplayed');
// }, nbBuild * G.tn.opt.Get('displayInterval'));
}, duration * G.tn.opt.Get('displayInterval'));
@@ -5144,7 +4695,7 @@ ToDo:
tab[lstThumb[i].left] = [];
cols.push( lstThumb[i].left );
}
- tab[lstThumb[i].left].push( lstThumb[i].idx );
+ tab[lstThumb[i].left].push( lstThumb[i].idx )
}
if( displayOrder == 'colFromRight' ) {
cols = cols.reverse();
@@ -5195,10 +4746,10 @@ ToDo:
if( G.tn.opt.Get('stacks') > 0 ) {
// we have stacks -> do not display them here. They will be displayed at the end of the display animation
item.$elt.last().css({ display: 'block'});
- item.$elt.css({ top: top , left: curTn.left + G.GOM.slider.left.thumbnails });
+ item.$elt.css({ top: top , left: curTn.left });
}
else {
- item.$elt.css({ display: 'block', top: top , left: curTn.left + G.GOM.slider.left.thumbnails });
+ item.$elt.css({ display: 'block', top: top , left: curTn.left });
}
newTop=top;
@@ -5238,15 +4789,17 @@ ToDo:
// with transition
var tweenable = new NGTweenable();
tweenable.tween({
- from: { top: item.top, left: item.left + G.GOM.slider.left.thumbnails, height: item.height, width: item.width },
- to: { top: newTop, left: curTn.left + G.GOM.slider.left.thumbnails, height: curTn.height, width: curTn.width },
+ from: { top: item.top, left: item.left, height: item.height, width: item.width },
+ to: { top: newTop, left: curTn.left, height: curTn.height, width: curTn.width },
attachment: { $e: item.$elt },
duration: 100,
delay: cnt * G.tn.opt.Get('displayInterval') / 5,
// easing: 'easeInOutQuad',
easing: 'easeOutQuart',
step: function (state, att) {
+ // window.ng_draf( function() {
att.$e.css(state);
+ // });
},
finish: function (state, att) {
var _this=this;
@@ -5258,23 +4811,23 @@ ToDo:
}
else {
// set position without transition
- item.$elt.css({ top: newTop , left: curTn.left + G.GOM.slider.left.thumbnails });
+ // item.$elt.css({ top: curTn.top , left: curTn.left });
+ item.$elt.css({ top: newTop , left: curTn.left });
}
}
}
else {
// re-display thumbnail
curTn.displayed = true;
- item.$elt.css({ display: 'block', top: newTop, left: curTn.left + G.GOM.slider.left.thumbnails, opacity: 1 });
+ // item.$elt.css({ display: 'block', top: curTn.top , left: curTn.left, opacity:1 });
+ item.$elt.css({ display: 'block', top: newTop, left: curTn.left, opacity: 1 });
ThumbnailAppearFinish(item);
}
}
else {
- // un-display thumbnail if not in viewport+margin --> performance gain
- if( !G.O.thumbnailDisplayOutsideScreen ) {
- curTn.displayed = false;
- item.$elt.css({ display: 'none'});
- }
+ // undisplay thumbnail if not in viewport+margin --> performance gain
+ curTn.displayed = false;
+ item.$elt.css({ display: 'none'});
}
}
item.left = curTn.left;
@@ -5306,10 +4859,8 @@ ToDo:
// add counter of remaining (not displayed) images
- if( G.GOM.tn_with_counter.idxNew == GOMidx ) {
- // if( G.GOM.tn_with_counter.idxNew == GOMidx && G.layout.support.rows ) {
- // if( (G.galleryDisplayMode.Get() == 'SLIDER' && G.galleryMaxRows.Get() > 0 && G.GOM.lastFullRow != -1) || (G.galleryDisplayMode.Get() == 'ROWS' && G.galleryMaxRows.Get() > 0) || (G.galleryDisplayMode.Get() == 'FULLCONTENT' && G.galleryLastRowFull.Get() && G.GOM.lastFullRow != -1) ){
- if( G.GOM.tn_with_counter.Enabled() ) {
+ if( G.GOM.lastDisplayedIdxNew == GOMidx && G.layout.support.rows ) {
+ if( (G.galleryDisplayMode.Get() == 'ROWS' && G.galleryMaxRows.Get() > 0) || (G.galleryDisplayMode.Get() == 'FULLCONTENT' && G.galleryLastRowFull.Get() && G.GOM.lastFullRow != -1) ){
// number of items
var nb = G.GOM.items.length - GOMidx - 1;
if( item.albumID != '0' && G.O.thumbnailLevelUp ) {
@@ -5322,18 +4873,18 @@ ToDo:
item.$getElt('.nGY2GThumbnailIconsFullThumbnail').html( '+' + nb);
}
- // if( G.layout.engine == 'GRID' && G.GOM.tn_slider.hostItem != G.GOM.NGY2Item(GOMidx) ) {
+ // if( G.layout.engine == 'GRID' && G.GOM.slider.hostItem != G.GOM.NGY2Item(GOMidx) ) {
// image slider on last displayed thumbnail
if( G.O.thumbnailLabel.get('position') != 'right' && G.O.thumbnailLabel.get('position') != 'left' ) {
- if( G.GOM.tn_slider.hostItem != G.GOM.NGY2Item(GOMidx) ) {
+ if( G.GOM.slider.hostItem != G.GOM.NGY2Item(GOMidx) ) {
// set current slider back to initial content
- GalleryThumbnailSliderSetContent( G.GOM.tn_slider.hostItem );
+ GalleryThumbnailSliderSetContent( G.GOM.slider.hostItem );
// new slider
- G.GOM.tn_slider.hostIdx = GOMidx;
- G.GOM.tn_slider.hostItem = G.GOM.NGY2Item(GOMidx);
- G.GOM.tn_slider.nextIdx = GOMidx;
- G.GOM.tn_slider.currentIdx = GOMidx;
+ G.GOM.slider.hostIdx = GOMidx;
+ G.GOM.slider.hostItem = G.GOM.NGY2Item(GOMidx);
+ G.GOM.slider.nextIdx = GOMidx;
+ G.GOM.slider.currentIdx = GOMidx;
GalleryThumbnailSliderBuildAndStart(); // image slider on last displayed thumbnail
// GalleryThumbnailSliderSetNextContent();
}
@@ -5341,11 +4892,11 @@ ToDo:
}
else {
// reset slider content to initial content because all thumbnails are displayed
- GalleryThumbnailSliderSetContent( G.GOM.tn_slider.hostItem );
- G.GOM.tn_slider.hostIdx = -1;
+ GalleryThumbnailSliderSetContent( G.GOM.slider.hostItem );
+ G.GOM.slider.hostIdx = -1;
}
- G.GOM.tn_with_counter.idx = GOMidx;
+ G.GOM.lastDisplayedIdx = GOMidx;
}
}
@@ -5356,12 +4907,12 @@ ToDo:
// function GalleryLastThumbnailSlideImage() {
function GalleryThumbnailSliderBuildAndStart() {
- if( G.O.thumbnailSliderDelay == 0 || G.GOM.tn_slider.hostIdx == -1 ) {
+ if( G.O.thumbnailSliderDelay == 0 || G.GOM.slider.hostIdx == -1 ) {
return;
}
- clearTimeout(G.GOM.tn_slider.timerID);
+ clearTimeout(G.GOM.slider.timerID);
- var item = G.GOM.tn_slider.hostItem;
+ var item = G.GOM.slider.hostItem;
// dupplicate image layer -> for the next image
if( item.$getElt('.nGY2TnImgNext').length == 0 ) {
@@ -5378,30 +4929,30 @@ ToDo:
GalleryThumbnailSliderSetNextContent();
- // clearTimeout(G.GOM.tn_slider.timerID);
- // G.GOM.tn_slider.timerID = setTimeout(function(){ GalleryThumbnailSliderStartTransition() }, G.O.thumbnailSliderDelay);
- G.GOM.tn_slider.timerID = requestTimeout(function(){ GalleryThumbnailSliderStartTransition() }, G.O.thumbnailSliderDelay);
+ // clearTimeout(G.GOM.slider.timerID);
+ // G.GOM.slider.timerID = setTimeout(function(){ GalleryThumbnailSliderStartTransition() }, G.O.thumbnailSliderDelay);
+ G.GOM.slider.timerID = requestTimeout(function(){ GalleryThumbnailSliderStartTransition() }, G.O.thumbnailSliderDelay);
}
function GalleryThumbnailSliderSetNextContent() {
- G.GOM.tn_slider.nextIdx++;
- if( G.GOM.tn_slider.nextIdx >= G.GOM.items.length ) {
- G.GOM.tn_slider.nextIdx = G.GOM.tn_slider.hostIdx;
+ G.GOM.slider.nextIdx++;
+ if( G.GOM.slider.nextIdx >= G.GOM.items.length ) {
+ G.GOM.slider.nextIdx = G.GOM.slider.hostIdx;
}
// new image
- var newItem = G.GOM.NGY2Item(G.GOM.tn_slider.nextIdx);
+ var newItem = G.GOM.NGY2Item(G.GOM.slider.nextIdx);
// var imgBlurred = G.emptyGif;
var bgImg = "url('" + G.emptyGif + "')";
if( newItem.imageDominantColors != null ) {
// imgBlurred = newItem.imageDominantColors;
bgImg = "url('" + newItem.imageDominantColors + "')";
}
- G.GOM.tn_slider.hostItem.$getElt('.nGY2TnImgBackNext', true).css({'background-image': bgImg, opacity: 1 });
- G.GOM.tn_slider.hostItem.$getElt('.nGY2TnImgNext', true).css({ 'background-image': "url('" + newItem.thumbImg().src + "')", opacity: 1 });
- G.GOM.tn_slider.hostItem.$getElt('.nGY2TnImgNext .nGY2GThumbnailImg', true).attr('src', newItem.thumbImg().src );
+ G.GOM.slider.hostItem.$getElt('.nGY2TnImgBackNext', true).css({'background-image': bgImg, opacity: 1 });
+ G.GOM.slider.hostItem.$getElt('.nGY2TnImgNext', true).css({ 'background-image': "url('" + newItem.thumbImg().src + "')", opacity: 1 });
+ G.GOM.slider.hostItem.$getElt('.nGY2TnImgNext .nGY2GThumbnailImg', true).attr('src', newItem.thumbImg().src );
}
@@ -5409,11 +4960,11 @@ ToDo:
// thumbnail slider - transition from one image to the next one
function GalleryThumbnailSliderStartTransition() {
- if( G.GOM.tn_slider.hostItem.$getElt() != null ) {
+ if( G.GOM.slider.hostItem.$getElt() != null ) {
// slider transition
var tweenable = new NGTweenable();
- G.GOM.tn_slider.tween = tweenable;
+ G.GOM.slider.tween = tweenable;
tweenable.tween({
from: { 'left': 100 },
to: { 'left': 0 },
@@ -5423,41 +4974,46 @@ ToDo:
easing: 'easeOutQuart',
step: function (state) {
- if( G.GOM.tn_slider.hostItem.$getElt() == null ) {
+ if( G.GOM.slider.hostItem.$getElt() == null ) {
// the thumbnail may have been destroyed since the start of the animation
- G.GOM.tn_slider.tween.stop(false);
+ G.GOM.slider.tween.stop(false);
return;
}
- // slide current content
- G.GOM.tn_slider.hostItem.CSSTransformSet('.nGY2TnImgBack', 'translateX', -(100 - state.left) + '%');
- G.GOM.tn_slider.hostItem.CSSTransformApply( '.nGY2TnImgBack' );
- G.GOM.tn_slider.hostItem.CSSTransformSet('.nGY2TnImg', 'translateX', -(100 - state.left) + '%');
- G.GOM.tn_slider.hostItem.CSSTransformApply( '.nGY2TnImg' );
-
- // slide new content
- G.GOM.tn_slider.hostItem.CSSTransformSet('.nGY2TnImgBackNext', 'translateX', state.left + '%');
- G.GOM.tn_slider.hostItem.CSSTransformApply( '.nGY2TnImgBackNext' );
- G.GOM.tn_slider.hostItem.CSSTransformSet('.nGY2TnImgNext', 'translateX', state.left + '%');
- G.GOM.tn_slider.hostItem.CSSTransformApply( '.nGY2TnImgNext' );
+ // window.ng_draf( function() {
+ // slide current content
+ G.GOM.slider.hostItem.CSSTransformSet('.nGY2TnImgBack', 'translateX', -(100 - state.left) + '%');
+ G.GOM.slider.hostItem.CSSTransformApply( '.nGY2TnImgBack' );
+ G.GOM.slider.hostItem.CSSTransformSet('.nGY2TnImg', 'translateX', -(100 - state.left) + '%');
+ G.GOM.slider.hostItem.CSSTransformApply( '.nGY2TnImg' );
+
+ // slide new content
+ G.GOM.slider.hostItem.CSSTransformSet('.nGY2TnImgBackNext', 'translateX', state.left + '%');
+ G.GOM.slider.hostItem.CSSTransformApply( '.nGY2TnImgBackNext' );
+ G.GOM.slider.hostItem.CSSTransformSet('.nGY2TnImgNext', 'translateX', state.left + '%');
+ G.GOM.slider.hostItem.CSSTransformApply( '.nGY2TnImgNext' );
+ // });
+
},
finish: function (state) {
- if( G.GOM.tn_slider.hostItem.$getElt() == null ) {
+ if( G.GOM.slider.hostItem.$getElt() == null ) {
// the thumbnail may be destroyed since the start of the animation
return;
}
- if( G.GOM.NGY2Item(G.GOM.tn_slider.nextIdx) == null ) { return; } // item does not exist anymore
+ if( G.GOM.NGY2Item(G.GOM.slider.nextIdx) == null ) { return; } // item does not exist anymore
- // set new content as current content
- GalleryThumbnailSliderSetContent( G.GOM.NGY2Item(G.GOM.tn_slider.nextIdx) );
- G.GOM.tn_slider.currentIdx = G.GOM.tn_slider.nextIdx;
- GalleryThumbnailSliderSetNextContent();
-
- clearTimeout(G.GOM.tn_slider.timerID);
- // G.GOM.tn_slider.timerID=setTimeout(function(){ GalleryThumbnailSliderStartTransition() }, G.O.thumbnailSliderDelay);
- G.GOM.tn_slider.timerID = requestTimeout(function(){ GalleryThumbnailSliderStartTransition() }, G.O.thumbnailSliderDelay);
+ // window.ng_draf( function() {
+ // set new content as current content
+ GalleryThumbnailSliderSetContent( G.GOM.NGY2Item(G.GOM.slider.nextIdx) );
+ G.GOM.slider.currentIdx = G.GOM.slider.nextIdx;
+ GalleryThumbnailSliderSetNextContent();
+
+ clearTimeout(G.GOM.slider.timerID);
+ // G.GOM.slider.timerID=setTimeout(function(){ GalleryThumbnailSliderStartTransition() }, G.O.thumbnailSliderDelay);
+ G.GOM.slider.timerID = requestTimeout(function(){ GalleryThumbnailSliderStartTransition() }, G.O.thumbnailSliderDelay);
+ // });
}
});
}
@@ -5466,11 +5022,11 @@ ToDo:
// set main content of the thumbnail hosting the slider
// hide the elements for the next content of the slider
function GalleryThumbnailSliderSetContent( ngy2itemContent ) {
- if( G.GOM.tn_slider.hostIdx == -1 ) { return; }
+ if( G.GOM.slider.hostIdx == -1 ) { return; }
- if( G.GOM.tn_slider.tween != null ) {
- if( G.GOM.tn_slider.tween._isTweening == true ) {
- G.GOM.tn_slider.tween.stop(false);
+ if( G.GOM.slider.tween != null ) {
+ if( G.GOM.slider.tween._isTweening == true ) {
+ G.GOM.slider.tween.stop(false);
}
}
@@ -5478,20 +5034,20 @@ ToDo:
if( ngy2itemContent.imageDominantColors != null ) {
bgImg = "url('" + ngy2itemContent.imageDominantColors + "')";
}
- G.GOM.tn_slider.hostItem.$getElt('.nGY2TnImgBack').css('background-image', bgImg);
- G.GOM.tn_slider.hostItem.$getElt('.nGY2TnImg').css('background-image', "url('" + ngy2itemContent.thumbImg().src + "')" );
- G.GOM.tn_slider.hostItem.$getElt('.nGY2TnImg .nGY2GThumbnailImg').attr('src', ngy2itemContent.thumbImg().src );
+ G.GOM.slider.hostItem.$getElt('.nGY2TnImgBack').css('background-image', bgImg);
+ G.GOM.slider.hostItem.$getElt('.nGY2TnImg').css('background-image', "url('" + ngy2itemContent.thumbImg().src + "')" );
+ G.GOM.slider.hostItem.$getElt('.nGY2TnImg .nGY2GThumbnailImg').attr('src', ngy2itemContent.thumbImg().src );
- G.GOM.tn_slider.hostItem.CSSTransformSet('.nGY2TnImgBack', 'translateX', '0%');
- G.GOM.tn_slider.hostItem.CSSTransformApply( '.nGY2TnImgBack' );
- G.GOM.tn_slider.hostItem.CSSTransformSet('.nGY2TnImg', 'translateX', '0%');
- G.GOM.tn_slider.hostItem.CSSTransformApply( '.nGY2TnImg' );
+ G.GOM.slider.hostItem.CSSTransformSet('.nGY2TnImgBack', 'translateX', '0');
+ G.GOM.slider.hostItem.CSSTransformApply( '.nGY2TnImgBack' );
+ G.GOM.slider.hostItem.CSSTransformSet('.nGY2TnImg', 'translateX', '0');
+ G.GOM.slider.hostItem.CSSTransformApply( '.nGY2TnImg' );
// place the containers for the next image slider outside of the thumbnail (=hidden)
- G.GOM.tn_slider.hostItem.CSSTransformSet('.nGY2TnImgBackNext', 'translateX', '100%', true);
- G.GOM.tn_slider.hostItem.CSSTransformApply( '.nGY2TnImgBackNext' );
- G.GOM.tn_slider.hostItem.CSSTransformSet('.nGY2TnImgNext', 'translateX', '100%', true);
- G.GOM.tn_slider.hostItem.CSSTransformApply( '.nGY2TnImgNext' );
+ G.GOM.slider.hostItem.CSSTransformSet('.nGY2TnImgBackNext', 'translateX', '100%', true);
+ G.GOM.slider.hostItem.CSSTransformApply( '.nGY2TnImgBackNext' );
+ G.GOM.slider.hostItem.CSSTransformSet('.nGY2TnImgNext', 'translateX', '100%', true);
+ G.GOM.slider.hostItem.CSSTransformApply( '.nGY2TnImgNext' );
// set new title and description
if( G.O.thumbnailLabel.get('display') == true ) {
@@ -5499,8 +5055,8 @@ ToDo:
if( ngy2itemContent.kind != 'album' ) {
icons = G.O.icons.thumbnailImage;
}
- G.GOM.tn_slider.hostItem.$getElt('.nGY2GThumbnailTitle').html(icons + getThumbnailTitle(ngy2itemContent));
- G.GOM.tn_slider.hostItem.$getElt('.nGY2GThumbnailDescription').html(icons + getTumbnailDescription(ngy2itemContent));
+ G.GOM.slider.hostItem.$getElt('.nGY2GThumbnailTitle').html(icons + getThumbnailTitle(ngy2itemContent));
+ G.GOM.slider.hostItem.$getElt('.nGY2GThumbnailDescription').html(icons + getTumbnailDescription(ngy2itemContent));
}
}
@@ -6413,9 +5969,8 @@ ToDo:
function ThumbnailHover( GOMidx ) {
- // if( G.GOM.albumIdx == -1 || !G.galleryResizeEventEnabled ) { return; };
- if( G.GOM.albumIdx == -1 ) { return; };
- if( G.GOM.tn_slider.hostIdx == GOMidx ) {
+ if( G.GOM.albumIdx == -1 || !G.galleryResizeEventEnabled ) { return; };
+ if( G.GOM.slider.hostIdx == GOMidx ) {
// slider hosted on thumbnail -> no hover effect
return;
}
@@ -6451,7 +6006,7 @@ ToDo:
if( G.GOM.albumIdx == -1 ) { return; };
var l = G.GOM.items.length;
for( var i = 0; i < l ; i++ ) {
- if( G.GOM.items[i].inDisplayInterval ) {
+ if( G.GOM.items[i].inDisplayArea ) {
ThumbnailHoverOut(i);
}
else {
@@ -6462,10 +6017,9 @@ ToDo:
function ThumbnailHoverOut( GOMidx ) {
- // if( G.GOM.albumIdx == -1 || !G.galleryResizeEventEnabled ) { return; }
- if( G.GOM.albumIdx == -1 ) { return; }
+ if( G.GOM.albumIdx == -1 || !G.galleryResizeEventEnabled ) { return; }
- if( G.GOM.tn_slider.hostIdx == GOMidx ) {
+ if( G.GOM.slider.hostIdx == GOMidx ) {
// slider on thumbnail -> no hover effect
return;
}
@@ -8375,9 +7929,8 @@ debugger;
if( r.GOMidx == -1 ) { return 'exit'; }
var idx = G.GOM.items[r.GOMidx].thumbnailIdx;
- if( G.GOM.tn_slider.hostIdx == r.GOMidx ) {
- // slider clicked
- idx = G.GOM.items[G.GOM.tn_slider.currentIdx].thumbnailIdx;
+ if( G.GOM.slider.hostIdx == r.GOMidx ) {
+ idx = G.GOM.items[G.GOM.slider.currentIdx].thumbnailIdx;
}
switch( r.action ) {
case 'OPEN':
@@ -8671,7 +8224,6 @@ debugger;
}
function GalleryMouseLeave(e) {
-
if( !G.VOM.viewerDisplayed && G.GOM.albumIdx != -1 ) {
var r = GalleryEventRetrieveElementl(e, true);
if( r.GOMidx != -1 ) {
@@ -9562,9 +9114,7 @@ debugger;
// click/tap on image to go to next/previous one
// G.VOM.hammertime.on('tap', function(ev) {
G.VOM.hammertime.on('singletap', function(ev) {
-
if( !ViewerEvents() ) { return; }
-
StopPropagationPreventDefault( ev.srcEvent );
if( G.VOM.toolbarsDisplayed == false ){
// display tools on tap if hidden
@@ -10707,29 +10257,24 @@ debugger;
}
// configure gallery depending on some thumbnail hover effects
- // var effects=G.tn.hoverEffects.std.concat(G.tn.hoverEffects.level1);
- // for( var j=0; j G.GOM.panThreshold ) {
G.GOM.panYOnly = true;
@@ -10835,19 +10365,10 @@ debugger;
G.$E.conTn.css( G.CSStransformName , 'translate('+(ev.deltaX)+'px,0px)');
}
}
-
- // Slider
- if( G.galleryDisplayMode.Get() == 'SLIDER' ) {
- SliderPanThrottled( ev.deltaX );
- }
}
});
-
-
G.GOM.hammertime.on('panend', function(ev) {
if( !G.VOM.viewerDisplayed ) {
-
- // Pagination
if( G.O.paginationSwipe && G.layout.support.rows && G.galleryDisplayMode.Get() == 'PAGINATION' ) {
if( !G.GOM.panYOnly ) {
if( ev.deltaX > 50 ) {
@@ -10861,13 +10382,12 @@ debugger;
}
G.GOM.panYOnly = false;
G.$E.conTn.css( G.CSStransformName , 'translate(0px,0px)');
+ // pX=0;
}
-
}
});
// tap on gallery
G.GOM.hammertime.on('tap', function(ev) {
-
if( !G.VOM.viewerDisplayed ) {
ev.srcEvent.stopPropagation();
ev.srcEvent.preventDefault(); // cancel mouseenter event
@@ -10884,10 +10404,10 @@ debugger;
return;
}
- if( G.GOM.tn_slider.hostIdx == r.GOMidx ) {
+ if( G.GOM.slider.hostIdx == r.GOMidx ) {
// touch on thumbnail slider -> open immediately
ThumbnailHoverOutAll();
- ThumbnailOpen(G.GOM.items[G.GOM.tn_slider.currentIdx].thumbnailIdx, true);
+ ThumbnailOpen(G.GOM.items[G.GOM.slider.currentIdx].thumbnailIdx, true);
return;
}
@@ -11051,7 +10571,7 @@ debugger;
}
if( newLocationHash == '' ) {
- // if( G.GOM.tn_with_counter.idx != -1 ) {
+ // if( G.GOM.lastDisplayedIdx != -1 ) {
if( G.locationHashLastUsed !== '' ) {
// back button and no hash --> display first album
if( G.O.debugMode ) { console.log('display root album' ); }
@@ -11160,6 +10680,7 @@ debugger;
if( JSON.stringify(s.mosaic[l][w]) !== JSON.stringify(s.mosaic[l][nw]) ) {
// mosaic definition changed
G.GOM.curWidth = nw;
+ G.GOM.pagination.currentPage = 0;
GalleryRender( G.GOM.albumIdx );
return;
}
@@ -11170,6 +10691,7 @@ debugger;
// thumbnail size / gutter size changed --> render the gallery with the new values
G.GOM.curWidth = nw;
//G.layout.SetEngine();
+ G.GOM.pagination.currentPage = 0;
GalleryRender( G.GOM.albumIdx );
return;
}
diff --git a/dist/jquery.nanogallery2.min.js b/dist/jquery.nanogallery2.min.js
index d3fbbf52..a897fcfc 100644
--- a/dist/jquery.nanogallery2.min.js
+++ b/dist/jquery.nanogallery2.min.js
@@ -18,14 +18,14 @@
* - webfont generated with http://fontello.com - mainly based on Font Awesome Copyright (C) 2012 by Dave Gandy (http://fontawesome.io/)
* - ICO online converter: https://iconverticons.com/online/
*/
-!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports&&"function"==typeof require?e(require("jquery")):e(jQuery)}((function(e){"use strict";function t(e){var t=document.getElementById("ngyColorHelperToRGB");return null===t&&((t=document.createElement("div")).id="ngyColorHelperToRGB",t.style.cssText="display: none; color:"+e+";",document.body.appendChild(t)),getComputedStyle(t).color}function n(e,t,n){var i="";if("RGBA("==t.toUpperCase().substring(0,5)&&(i="a",t="rgb("+t.substring(5)),"number"!=typeof e||e<-1||e>1||"string"!=typeof t||"r"!=t[0]&&"#"!=t[0]||"string"!=typeof n&&void 0!==n)return null;function a(e){var t=e.length,n=new Object;if(t>9){if((e=e.split(",")).length<3||e.length>4)return null;n[0]=o(e[0].slice(4)),n[1]=o(e[1]),n[2]=o(e[2]),n[3]=e[3]?parseFloat(e[3]):-1}else{if(8==t||6==t||t<4)return null;t<6&&(e="#"+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+(t>4?e[4]+""+e[4]:"")),e=o(e.slice(1),16),n[0]=e>>16&255,n[1]=e>>8&255,n[2]=255&e,n[3]=9==t||5==t?r((e>>24&255)/255*1e4)/1e4:-1}return n}var o=parseInt,r=Math.round,l=t.length>9,s=(l="string"==typeof n?n.length>9||"c"==n&&!l:l,e<0),u=(e=s?-1*e:e,n=n&&"c"!=n?n:s?"#000000":"#FFFFFF",a(t)),c=a(n);return u&&c?l?"rgb"+i+"("+r((c[0]-u[0])*e+u[0])+","+r((c[1]-u[1])*e+u[1])+","+r((c[2]-u[2])*e+u[2])+(u[3]<0&&c[3]<0?")":","+(u[3]>-1&&c[3]>-1?r(1e4*((c[3]-u[3])*e+u[3]))/1e4:c[3]<0?u[3]:c[3])+")"):"#"+(4294967296+16777216*(u[3]>-1&&c[3]>-1?r(255*((c[3]-u[3])*e+u[3])):c[3]>-1?r(255*c[3]):u[3]>-1?r(255*u[3]):255)+65536*r((c[0]-u[0])*e+u[0])+256*r((c[1]-u[1])*e+u[1])+r((c[2]-u[2])*e+u[2])).toString(16).slice(u[3]>-1||c[3]>-1?1:3):null}function i(e){if(null===e||"object"!=typeof e)return e;var t=e.constructor();for(var n in e)t[n]=i(e[n]);return t}function a(){var e=jQuery(window);return{l:e.scrollLeft(),t:e.scrollTop(),w:e.width(),h:e.height()}}function o(e,t){var n=0;""==e&&(e="*"),jQuery(e).each((function(){var e=parseInt(jQuery(this).css("z-index"));n=e>n?e:n})),n++,jQuery(t).css("z-index",n)}var r=function(e){return{}.toString.call(e).match(/\s([a-zA-Z]+)/)[1].toLowerCase()};function l(){this.LightboxReOpen=function(){p()},this.ReloadAlbum=function(){if(""===c.O.kind)throw"Not supported for this content source:"+c.O.kind;var e=c.GOM.albumIdx;if(-1==e)throw"Current album not found.";for(var t=c.I[e].GetID(),n=c.I.length,i=0;i1&&e--,c.GOM.pagination.currentPage=e,c.GOM.ScrollToTop(),N(),Y(!0),!1},this.PaginationCountPages=function(){return 0==c.GOM.items.length?0:Math.ceil((c.GOM.items[c.GOM.items.length-1].row+1)/c.galleryMaxRows.Get())};var s=function(e,t,n){var i,a,o,r=null,l=0;n||(n={});var s=function(){l=!1===n.leading?0:(new Date).getTime(),r=null,o=e.apply(i,a),r||(i=a=null)};return function(){var u=(new Date).getTime();l||!1!==n.leading||(l=u);var c=t-(u-l);return i=this,a=arguments,c<=0||c>t?(r&&(clearTimeout(r),r=null),l=u,o=e.apply(i,a),r||(i=a=null)):r||!1===n.trailing||(r=setTimeout(s,c)),o}},u=function(e,t,n){var i;return function(){var a=this,o=arguments;function r(){n||e.apply(a,o),i=null}i?clearTimeout(i):n&&e.apply(a,o),i=setTimeout(r,t||100)}};window.ng_draf=function(e){return requestAnimationFrame((function(){window.requestAnimationFrame(e)}))},window.requestTimeout=function(e,t){if(!(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame&&window.mozCancelRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame))return window.setTimeout(e,t);var n=(new Date).getTime(),i=new Object;return i.value=requestAnimFrame((function a(){(new Date).getTime()-n>=t?e.call():i.value=requestAnimFrame(a)})),i},window.requestAnimFrame=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(e,t){window.setTimeout(e,1e3/60)},window.clearRequestTimeout=function(e){window.cancelAnimationFrame?window.cancelAnimationFrame(e.value):window.webkitCancelAnimationFrame?window.webkitCancelAnimationFrame(e.value):window.webkitCancelRequestAnimationFrame?window.webkitCancelRequestAnimationFrame(e.value):window.mozCancelRequestAnimationFrame?window.mozCancelRequestAnimationFrame(e.value):window.oCancelRequestAnimationFrame?window.oCancelRequestAnimationFrame(e.value):window.msCancelRequestAnimationFrame?window.msCancelRequestAnimationFrame(e.value):clearTimeout(e)};var c=this;function h(e){this.$e=null,this.ngy2ItemIdx=e,this.mediaNumber=c.VOM.items.length+1,this.posX=0,this.posY=0}c.I=[],c.Id=[],c.O=null,c.baseEltID=null,c.$E={base:null,conTnParent:null,conLoadingB:null,conConsole:null,conNavigationBar:null,conTnBottom:null,scrollableParent:null},c.shoppingCart=[],c.layout={internal:!0,engine:"",support:{rows:!1},prerequisite:{imageSize:!1},SetEngine:function(){if(c.layout.internal){if("auto"==c.tn.settings.width[c.GOM.curNavLevel][c.GOM.curWidth]||""==c.tn.settings.width[c.GOM.curNavLevel][c.GOM.curWidth])return c.layout.engine="JUSTIFIED",c.layout.support.rows=!0,void(c.layout.prerequisite.imageSize=!0);if("auto"==c.tn.settings.height[c.GOM.curNavLevel][c.GOM.curWidth]||""==c.tn.settings.height[c.GOM.curNavLevel][c.GOM.curWidth])return c.layout.engine="CASCADING",c.layout.support.rows=!1,void(c.layout.prerequisite.imageSize=!0);if(null!=c.tn.settings.getMosaic())return c.layout.engine="MOSAIC",c.layout.support.rows=!0,void(c.layout.prerequisite.imageSize=!1);c.layout.engine="GRID",c.layout.support.rows=!0,c.layout.prerequisite.imageSize=!1}}},c.galleryResizeEventEnabled=!1,c.galleryMaxRows={l1:0,lN:0,Get:function(){return c.galleryMaxRows[c.GOM.curNavLevel]}},c.galleryMaxItems={l1:0,lN:0,Get:function(){return c.galleryMaxItems[c.GOM.curNavLevel]}},c.galleryFilterTags={l1:0,lN:0,Get:function(){return c.galleryFilterTags[c.GOM.curNavLevel]}},c.galleryFilterTagsMode={l1:0,lN:0,Get:function(){return c.galleryFilterTagsMode[c.GOM.curNavLevel]}},c.galleryDisplayMode={l1:"FULLCONTENT",lN:"FULLCONTENT",Get:function(){return c.galleryDisplayMode[c.GOM.curNavLevel]}},c.galleryLastRowFull={l1:!1,lN:!1,Get:function(){return c.galleryLastRowFull[c.GOM.curNavLevel]}},c.gallerySorting={l1:"",lN:"",Get:function(){return c.gallerySorting[c.GOM.curNavLevel]}},c.galleryDisplayTransition={l1:"none",lN:"none",Get:function(){return c.galleryDisplayTransition[c.GOM.curNavLevel]}},c.galleryDisplayTransitionDuration={l1:500,lN:500,Get:function(){return c.galleryDisplayTransitionDuration[c.GOM.curNavLevel]}},c.$currentTouchedThumbnail=null,c.tn={opt:{l1:{crop:!0,stacks:0,stacksTranslateX:0,stacksTranslateY:0,stacksTranslateZ:0,stacksRotateX:0,stacksRotateY:0,stacksRotateZ:0,stacksScale:0,borderHorizontal:0,borderVertical:0,baseGridHeight:0,displayTransition:"FADEIN",displayTransitionStartVal:0,displayTransitionEasing:"easeOutQuart",displayTransitionDuration:240,displayInterval:15},lN:{crop:!0,stacks:0,stacksTranslateX:0,stacksTranslateY:0,stacksTranslateZ:0,stacksRotateX:0,stacksRotateY:0,stacksRotateZ:0,stacksScale:0,borderHorizontal:0,borderVertical:0,baseGridHeight:0,displayTransition:"FADEIN",displayTransitionStartVal:0,displayTransitionEasing:"easeOutQuart",displayTransitionDuration:240,displayInterval:15},Get:function(e){return c.tn.opt[c.GOM.curNavLevel][e]}},scale:1,labelHeight:{l1:0,lN:0,get:function(){return c.tn.labelHeight[c.GOM.curNavLevel]}},defaultSize:{width:{l1:{xs:0,sm:0,me:0,la:0,xl:0},lN:{xs:0,sm:0,me:0,la:0,xl:0}},height:{l1:{xs:0,sm:0,me:0,la:0,xl:0},lN:{xs:0,sm:0,me:0,la:0,xl:0}},getWidth:function(){return c.tn.defaultSize.width[c.GOM.curNavLevel][c.GOM.curWidth]},getOuterWidth:function(){c.tn.borderWidth=c.tn.opt.Get("borderHorizontal"),c.tn.borderHeight=c.tn.opt.Get("borderVertical");var e=c.tn.defaultSize.width[c.GOM.curNavLevel][c.GOM.curWidth]+2*c.tn.opt.Get("borderHorizontal");return"right"!=c.O.thumbnailLabel.get("position")&&"left"!=c.O.thumbnailLabel.get("position")||(e+=c.tn.defaultSize.width[c.GOM.curNavLevel][c.GOM.curWidth]),e},getHeight:function(){return c.tn.defaultSize.height[c.GOM.curNavLevel][c.GOM.curWidth]},getOuterHeight:function(){return c.tn.defaultSize.height[c.GOM.curNavLevel][c.GOM.curWidth]+2*c.tn.opt.Get("borderVertical")}},settings:{width:{l1:{xs:0,sm:0,me:0,la:0,xl:0,xsc:"u",smc:"u",mec:"u",lac:"u",xlc:"u"},lN:{xs:0,sm:0,me:0,la:0,xl:0,xsc:"u",smc:"u",mec:"u",lac:"u",xlc:"u"}},height:{l1:{xs:0,sm:0,me:0,la:0,xl:0,xsc:"u",smc:"u",mec:"u",lac:"u",xlc:"u"},lN:{xs:0,sm:0,me:0,la:0,xl:0,xsc:"u",smc:"u",mec:"u",lac:"u",xlc:"u"}},getH:function(e,t){var n=null==e?c.GOM.curNavLevel:e,i=null==t?c.GOM.curWidth:t;return"MOSAIC"==c.layout.engine?this.height[n][i]*this.mosaic[n+"Factor"].h[i]:this.height[n][i]},getW:function(e,t){var n=null==e?c.GOM.curNavLevel:e,i=null==t?c.GOM.curWidth:t;return"MOSAIC"==c.layout.engine?this.width[n][i]*this.mosaic[n+"Factor"].w[i]:this.width[n][i]},mosaic:{l1:{xs:null,sm:null,me:null,la:null,xl:null},lN:{xs:null,sm:null,me:null,la:null,xl:null},l1Factor:{h:{xs:1,sm:1,me:1,la:1,xl:1},w:{xs:1,sm:1,me:1,la:1,xl:1}},lNFactor:{h:{xs:1,sm:1,me:1,la:1,xl:1},w:{xs:1,sm:1,me:1,la:1,xl:1}}},getMosaic:function(){return this.mosaic[c.GOM.curNavLevel][c.GOM.curWidth]},mosaicCalcFactor:function(e,t){for(var n=1,i=1,a=0;a0&&-1!=c.GOM.lastFullRow)return!0}return!1}},tn_slider:{hostIdx:-1,hostItem:null,currentIdx:0,nextIdx:0,timerID:0,tween:null},NGY2Item:function(e){if(null==c.GOM.items[e]||null==c.GOM.items[e])return null;var t=c.GOM.items[e].thumbnailIdx;return c.I[t]},GTn:function(e,t,n){this.thumbnailIdx=e,this.width=0,this.height=0,this.top=0,this.left=0,this.row=0,this.imageWidth=t,this.imageHeight=n,this.resizedContentWidth=0,this.resizedContentHeight=0,this.displayed=!1,this.neverDisplayed=!0,this.inDisplayInterval=!1},ScrollToTop:function(){var e,t,n,i;if(!c.GOM.firstDisplay&&(null!==c.$E.scrollableParent||(e=c.$E.base,t=20,n=a(),(i=e.offset()).top>=n.t&&i.top<=n.t+n.h-t)||c.$E.base.get(0).scrollIntoView(),null!==c.$E.scrollableParent)){var o=c.$E.scrollableParent.scrollTop(),r=Math.abs(c.$E.scrollableParent.offset().top-c.$E.base.offset().top-o);o>r&&window.ng_draf((function(){c.$E.scrollableParent.scrollTop(r)}))}}},c.VOM={viewerDisplayed:!1,viewerIsFullscreen:!1,infoDisplayed:!1,toolbarsDisplayed:!0,toolsHide:null,zoom:{posX:0,posY:0,userFactor:1,isZooming:!1},padding:{H:0,V:0},window:{lastWidth:0,lastHeight:0},$viewer:null,$toolbar:null,$toolbarTL:null,$toolbarTR:null,toolbarMode:"std",playSlideshow:!1,playSlideshowTimerID:0,slideshowDelay:3e3,albumID:-1,viewerMediaIsChanged:!1,items:[],panMode:"off",$baseCont:null,$content:null,content:{previous:{vIdx:-1,$media:null,NGY2Item:function(){return c.I[c.VOM.items[c.VOM.content.previous.vIdx].ngy2ItemIdx]}},current:{vIdx:-1,$media:null,NGY2Item:function(){return c.I[c.VOM.items[c.VOM.content.current.vIdx].ngy2ItemIdx]}},next:{vIdx:-1,$media:null,NGY2Item:function(){return c.I[c.VOM.items[c.VOM.content.next.vIdx].ngy2ItemIdx]}}},IdxNext:function(){var e=0;return c.VOM.content.current.vIdx=t){var n=this.oneTmbWidth*c.VOM.content.current.vIdx;n+this.posX=this.vwidth&&(this.posX=this.vwidth-(n+this.oneTmbWidth))}this.PanGallery(0)}},PanGallery:function(e){this.gwidththis.vwidth-this.oneTmbWidth&&(this.posX=this.vwidth-this.oneTmbWidth),this.posX+this.gwidthc.VOM.ImageLoader.maxChecks?(c.VOM.ImageLoader.list[i]=null,e.callback(0,0,e.ngitem,e.checks)):(t++,e.checks++));0==t&&(c.VOM.ImageLoader.list=[],clearInterval(c.VOM.ImageLoader.intervalHandle),delete c.VOM.ImageLoader.intervalHandle)}}},c.popup={isDisplayed:!1,$elt:null,close:function(){null!=this.$elt&&(new NGTweenable).tween({from:{opacity:1},to:{opacity:0},attachment:{t:this},easing:"easeInOutSine",duration:100,step:function(e,t){null!=t.t.$elt&&t.t.$elt.css("opacity",e.opacity)},finish:function(e,t){null!=t.t.$elt&&(t.t.$elt.remove(),t.t.$elt=null),t.t.isDisplayed=!1}})}},c.galleryTheme_dark={navigationBar:{background:"none",borderTop:"",borderBottom:"",borderRight:"",borderLeft:""},navigationBreadcrumb:{background:"#111",color:"#fff",colorHover:"#ccc",borderRadius:"4px"},navigationFilter:{color:"#ddd",background:"#111",colorSelected:"#fff",backgroundSelected:"#111",borderRadius:"4px"},navigationPagination:{background:"#111",color:"#fff",colorHover:"#ccc",borderRadius:"4px"},thumbnail:{background:"#444",backgroundImage:"linear-gradient(315deg, #111 0%, #445 90%)",borderColor:"#000",borderRadius:"0px",labelOpacity:1,labelBackground:"rgba(34, 34, 34, 0)",titleColor:"#fff",titleBgColor:"transparent",titleShadow:"",descriptionColor:"#ccc",descriptionBgColor:"transparent",descriptionShadow:"",stackBackground:"#aaa"},thumbnailIcon:{padding:"5px",color:"#fff",shadow:""},pagination:{background:"#181818",backgroundSelected:"#666",color:"#fff",borderRadius:"2px",shapeBorder:"3px solid #666",shapeColor:"#444",shapeSelectedColor:"#aaa"}},c.galleryTheme_light={navigationBar:{background:"none",borderTop:"",borderBottom:"",borderRight:"",borderLeft:""},navigationBreadcrumb:{background:"#eee",color:"#000",colorHover:"#333",borderRadius:"4px"},navigationFilter:{background:"#eee",color:"#222",colorSelected:"#000",backgroundSelected:"#eee",borderRadius:"4px"},navigationPagination:{background:"#eee",color:"#000",colorHover:"#333",borderRadius:"4px"},thumbnail:{background:"#444",backgroundImage:"linear-gradient(315deg, #111 0%, #445 90%)",borderColor:"#000",labelOpacity:1,labelBackground:"rgba(34, 34, 34, 0)",titleColor:"#fff",titleBgColor:"transparent",titleShadow:"",descriptionColor:"#ccc",descriptionBgColor:"transparent",descriptionShadow:"",stackBackground:"#888"},thumbnailIcon:{padding:"5px",color:"#fff"},pagination:{background:"#eee",backgroundSelected:"#aaa",color:"#000",borderRadius:"2px",shapeBorder:"3px solid #666",shapeColor:"#444",shapeSelectedColor:"#aaa"}},c.viewerTheme_dark={background:"#000",barBackground:"rgba(4, 4, 4, 0.2)",barBorder:"0px solid #111",barColor:"#fff",barDescriptionColor:"#ccc"},c.viewerTheme_light={background:"#f8f8f8",barBackground:"rgba(4, 4, 4, 0.7)",barBorder:"0px solid #111",barColor:"#fff",barDescriptionColor:"#ccc"};var d=NGY2Tools.NanoAlert,m=NGY2Tools.NanoConsoleLog;function p(){c.VOM.items=[],c.VOM.albumID="0",c.GOM.curNavLevel="l1";for(var e=0,t=c.$E.base[0].src,n=void 0,i=0;i0?_e(n):m(c,"No content for Lightbox standalone.")}function g(e){var t={albumID:"0",imageID:"0"},n=e.split("/");return n.length>0&&(t.albumID=n[0],n.length>1&&(t.imageID=n[1])),t}function f(e,t){c.VOM.viewerDisplayed&&rt(null);var n=NGY2Item.GetIdx(c,t);c.GOM.curNavLevel="lN",0==n&&(c.GOM.curNavLevel="l1"),c.layout.SetEngine(),c.galleryResizeEventEnabled=!1,-1==n&&(NGY2Item.New(c,"","",t,"0","album"),n=c.I.length-1),c.I[n].contentIsLoaded?(be(),c.GOM.pagination.currentPage=0,ht(t,""),L(n)):te(t,f,e,t)}function b(){switch(c.galleryDisplayMode.Get()){case"PAGINATION":c.layout.support.rows&&c.galleryMaxRows.Get()>0&&function(){if(c.$E.conTnBottom.css("opacity",0),c.$E.conTnBottom.children().remove(),0==c.GOM.items.length)return;var e=Math.ceil((c.GOM.items[c.GOM.items.length-1].row+1)/c.galleryMaxRows.Get());if(1==e)return;c.GOM.pagination.currentPage>e-1&&(c.GOM.pagination.currentPage=e-1);if(S(),0==c.GOM.displayInterval.len)return;if("NUMBERS"==c.O.galleryPaginationMode&&c.GOM.pagination.currentPage>0){jQuery('").appendTo(c.$E.conTnBottom).click((function(e){M()}))}var t=0,n=e;if("NUMBERS"!=c.O.galleryPaginationMode)t=0;else{var i=c.O.paginationVisiblePages;if(i>=e)t=0;else{var a=0;a=i%2==1?(i+1)/2:i/2,c.GOM.pagination.currentPagee&&(n=e-1)):(t=c.GOM.pagination.currentPage-a,(n=t+i)>e&&(n=e-1)),n-t'+l+"").appendTo(c.$E.conTnBottom);s.data("pageNumber",o),s.click((function(e){c.GOM.pagination.currentPage=jQuery(this).data("pageNumber"),ut("pageChanged"),c.GOM.ScrollToTop(),N(),Y(!0)}))}if("NUMBERS"==c.O.galleryPaginationMode&&c.GOM.pagination.currentPage+1