WP Photo Album Plus - Version 7.5.07.004

Version Description

= 7.5.07 =

  • This version addresses various bug fixes and feature requests.
Download this release

Release Info

Developer opajaap
Plugin Icon wp plugin WP Photo Album Plus
Version 7.5.07.004
Comparing to
See all releases

Code changes from version 7.5.07.003 to 7.5.07.004

js/wppa-all.js CHANGED
@@ -13,4 +13,4 @@ var wppaJsPopupVersion="7.5.03";function wppaPopUp(p,t,e,r,a,i,o,n,d,s){var c,l,
13
  // wppa-touch
14
  var wppaJsTouchVersion="7.5.03",wppaTriggerElementID=null,wppaFingerCount=0,wppaStartX=0,wppaStartY=0,wppaCurX=0,wppaCurY=0,wppaDeltaX=0,wppaDeltaY=0,wppaHorzDiff=0,wppaVertDiff=0,wppaMinLength=72,wppaSwipeLength=0,wppaSwipeAngle=null,wppaSwipeDirection=null,wppaSwipeOnLightbox=!1,wppaSwipeMocc=0,wppaMobileTimeStart=0;function wppaStartTime(){var p=(new Date).getTime();return wppaMobileTimeStart=p,!0}function wppaInTime(){return(new Date).getTime()-wppaMobileTimeStart<250}function wppaTapLink(p,e){wppaInTime()&&(_bumpClickCount(p),document.location.href=e)}function wppaTouchStart(p,e,a){-1==(wppaSwipeMocc=a)&&(wppaSwipeOnLightbox=!0,p.preventDefault()),1==(wppaFingerCount=p.touches.length)?(wppaStartX=p.touches[0].pageX,wppaStartY=p.touches[0].pageY,wppaTriggerElementID=e):wppaTouchCancel()}function wppaTouchMove(p){wppaSwipeOnLightbox&&p.preventDefault(),1==p.touches.length?(wppaCurX=p.touches[0].pageX,wppaCurY=p.touches[0].pageY):wppaTouchCancel()}function wppaTouchEnd(p){wppaSwipeOnLightbox&&p.preventDefault(),1==wppaFingerCount&&0!=wppaCurX&&(wppaSwipeLength=Math.round(Math.sqrt(Math.pow(wppaCurX-wppaStartX,2)+Math.pow(wppaCurY-wppaStartY,2))),wppaMinLength<=wppaSwipeLength&&(wppaCalculateAngle(),wppaDetermineSwipeDirection(),wppaProcessingRoutine())),wppaTouchCancel()}function wppaTouchCancel(){wppaTriggerElementID=wppaSwipeDirection=wppaSwipeAngle=null,wppaSwipeOnLightbox=!1,wppaSwipeMocc=wppaSwipeLength=wppaVertDiff=wppaHorzDiff=wppaDeltaY=wppaDeltaX=wppaCurY=wppaCurX=wppaStartY=wppaStartX=wppaFingerCount=0}function wppaCalculateAngle(){var p=wppaStartX-wppaCurX,e=wppaCurY-wppaStartY,a=(Math.round(Math.sqrt(Math.pow(p,2)+Math.pow(e,2))),Math.atan2(e,p));(wppaSwipeAngle=Math.round(180*a/Math.PI))<0&&(wppaSwipeAngle=360-Math.abs(wppaSwipeAngle))}function wppaDetermineSwipeDirection(){wppaSwipeDirection=wppaSwipeAngle<=45&&0<=wppaSwipeAngle||wppaSwipeAngle<=360&&315<=wppaSwipeAngle?"left":135<=wppaSwipeAngle&&wppaSwipeAngle<=225?"right":45<wppaSwipeAngle&&wppaSwipeAngle<135?"down":"up"}function wppaProcessingRoutine(){document.getElementById(wppaTriggerElementID);if(wppaSwipeOnLightbox)"left"==wppaSwipeDirection?wppaOvlShowNext():"right"==wppaSwipeDirection&&wppaOvlShowPrev();else{if("right"==wppaSwipeDirection){if(idx=_wppaCurIdx[wppaSwipeMocc]-1,idx<0){if(!wppaSlideWrap)return;idx=_wppaSlides[wppaSwipeMocc].length-1}wppaGotoKeepState(wppaSwipeMocc,idx)}if("left"==wppaSwipeDirection){if(idx=_wppaCurIdx[wppaSwipeMocc]+1,idx==_wppaSlides[wppaSwipeMocc].length){if(!wppaSlideWrap)return;idx=0}wppaGotoKeepState(wppaSwipeMocc,idx)}}wppaTouchCancel()}
15
  // wppa-zoom
16
- function wppaDoZoomPan(){for(var r,h=jQuery,a=!1,t=0;t<wppaZoomableData.length;t++)void 0!==wppaZoomableData[t]&&((r=wppaZoomableData[t]).image.complete?r.initialized||((r=wppaZoomableData[t]).manualControl=!1,r.deltaX=0,r.deltaY=0,r.deltaFactor=1,r.run=4,r.busy=!1,r.abort=!1,r.itemid=r.mocc+"-"+r.id,r.div=h("#wppa-pan-div-"+r.itemid),r.canvas=document.getElementById("wppa-pan-canvas-"+r.itemid),r.left=h("#wppa-pctl-left-"+r.itemid),r.right=h("#wppa-pctl-right-"+r.itemid),r.up=h("#wppa-pctl-up-"+r.itemid),r.down=h("#wppa-pctl-down-"+r.itemid),r.zoomin=h("#wppa-pctl-zoomin-"+r.itemid),r.zoomout=h("#wppa-pctl-zoomout-"+r.itemid),r.prev=h("#wppa-pctl-prev-"+r.itemid),r.next=h("#wppa-pctl-next-"+r.itemid),r.canvasWidth=r.width,r.canvasHeight=r.height,r.savedCanvasX=0,r.savedCanvasY=0,r.fromHeight=r.image.height,r.fromWidth=r.image.width,r.imageRatio=r.image.width/r.image.height,r.fromX=0,r.fromY=0,r.centerX=r.fromX+r.fromWidth/2,r.centerY=r.fromY+r.fromHeight/2,r.ctx=null,r.buttondown=!1,r.enableManual=!0,r.isMobile?(r.right.on("touchstart",n),r.right.on("touchend",l),r.left.on("touchstart",i),r.left.on("touchend",l),r.up.on("touchstart",p),r.up.on("touchend",l),r.down.on("touchstart",s),r.down.on("touchend",l),r.zoomin.on("touchstart",c),r.zoomin.on("touchend",l),r.zoomout.on("touchstart",m),r.zoomout.on("touchend",l),r.canvas.addEventListener("touchstart",v)):(r.canvas.addEventListener("mousedown",f),r.canvas.addEventListener("mousemove",g),r.canvas.addEventListener("mouseup",b),r.canvas.addEventListener("mouseout",b),document.getElementById("wppa-pan-canvas-"+r.itemid).addEventListener("wheel",d),r.right.on("mousedown",n),r.right.on("mouseup",l),r.left.on("mousedown",i),r.left.on("mouseup",l),r.up.on("mousedown",p),r.up.on("mouseup",l),r.down.on("mousedown",s),r.down.on("mouseup",l),r.zoomin.on("mousedown",c),r.zoomin.on("mouseup",l),r.zoomout.on("mousedown",m),r.zoomout.on("mouseup",l)),r.isLightbox&&(h("#wppa-fulls-btn").on("click",function(){abort=!0}),r.prev&&(r.prev.on("click",o),r.next.on("click",e))),h(window).on("DOMContentLoaded load resize orientationchange",w),u(t),w(),r.initialized=!0):a=!0);function u(a){if((r=wppaZoomableData[a]).isLightbox&&(wppaOvlOpen||(r.abort=!0)),r.abort)return r.ctx=null,void(r.prevctx=null);var t,o,e,n,i;0!=r.run&&(r.busy||(r.busy=!0,r.manualControl||(r.fromX+=r.deltaX,r.fromY+=r.deltaY,t=r.fromHeight/r.deltaFactor,o=r.fromWidth/r.deltaFactor,50<t&&1!=r.deltaFactor&&(wppaIsFs()||t<=r.image.height)&&(r.fromX-=(o-r.fromWidth)/2,r.fromY-=(t-r.fromHeight)/2,r.fromWidth=o,r.fromHeight=t)),r.fromX=Math.max(0,Math.min(r.image.width-r.fromWidth,r.fromX)),r.fromY=Math.max(0,Math.min(r.image.height-r.fromHeight,r.fromY)),e=screen.width/screen.height,n=(1-r.image.width/r.fromWidth)*r.canvas.width/2,i=(1-r.image.height/r.fromHeight)*r.canvas.height/2,r.ctx=r.canvas.getContext("2d"),e>r.imageRatio&&t>r.image.height&&wppaIsFs()||e<=r.imageRatio&&o>r.image.width&&wppaIsFs()?(r.enableManual=!1,r.ctx.clearRect(0,0,r.canvas.width,r.canvas.height),r.ctx.drawImage(r.image,r.fromX,r.fromY,r.fromWidth,r.fromHeight,n,i,r.canvas.width,r.canvas.height),jQuery(r.canvas).css({cursor:"default"})):(r.enableManual=!0,r.ctx.drawImage(r.image,r.fromX,r.fromY,r.fromWidth,r.fromHeight,0,0,r.canvas.width,r.canvas.height),jQuery(r.canvas).css({cursor:"grab"})),wppaIsFs()?(r.fsMaskTop=i-(r.canvas.height-screen.height)/2,r.fsMaskLeft=n-(r.canvas.width-screen.width)/2,r.fsMaskBottom=screen.height-r.fsMaskTop,r.fsMaskRight=screen.width-r.fsMaskLeft):(r.fsMaskTop=0,r.fsMaskLeft=0,r.fsMaskBottom=0,r.fsMaskRight=0),r.busy=!1,0<r.run&&(r.manualControl?setTimeout(function(){u(a)},25):r.buttondown&&setTimeout(function(){u(a)},5)),r.run<5&&r.run--,r.initializing&&(r.initializing=!1,r.run--),wppaAdjustControlbar()))}function o(a){var t;a.preventDefault(),this.abort=!0,t||(t=!0,h("#wppa-overlay-ic").css({display:"none"}),h("#wppa-ovl-spin").show(),wppaOvlShowPrev())}function e(a){var t;a.preventDefault(),this.abort=!0,t||(t=!0,h("#wppa-overlay-ic").css({display:"none"}),h("#wppa-ovl-spin").show(),wppaOvlShowNext())}function n(a){var t=jQuery(this).attr("data-mocc");wppaZoomableData[t]&&(a.preventDefault(),wppaZoomableData[t].run=5,wppaZoomableData[t].deltaX=3,r.buttondown=!0,u(t))}function i(a){var t=jQuery(this).attr("data-mocc");wppaZoomableData[t]&&(a.preventDefault(),wppaZoomableData[t].run=5,wppaZoomableData[t].deltaX=-3,r.buttondown=!0,u(t))}function p(a){var t=jQuery(this).attr("data-mocc");wppaZoomableData[t]&&(a.preventDefault(),wppaZoomableData[t].run=5,wppaZoomableData[t].deltaY=-3,r.buttondown=!0,u(t))}function s(a){var t=jQuery(this).attr("data-mocc");wppaZoomableData[t]&&(a.preventDefault(),wppaZoomableData[t].run=5,wppaZoomableData[t].deltaY=3,r.buttondown=!0,u(t))}function c(a){var t=jQuery(this).attr("data-mocc");wppaZoomableData[t]&&(a.preventDefault(),wppaZoomableData[t].run=5,wppaZoomableData[t].deltaFactor=1.005,r.buttondown=!0,u(t))}function m(a){var t=jQuery(this).attr("data-mocc");wppaZoomableData[t]&&(a.preventDefault(),wppaZoomableData[t].run=5,wppaZoomableData[t].deltaFactor=.995,r.buttondown=!0,u(t))}function d(a){var t=jQuery(this).attr("data-mocc");wppaZoomableData[t]&&(a.preventDefault(),wppaZoomableData[t].run=4,wppaZoomableData[t].deltaFactor=1+a.deltaY*wppaZoomableData[t].zoomsensitivity/(wppaIsChrome?1e4:1e3),u(t),setTimeout(function(){wppaZoomableData[t].deltaFactor=1},25),a.stopPropagation())}function l(a){var t=jQuery(this).attr("data-mocc");wppaZoomableData[t]&&(a.preventDefault(),wppaZoomableData[t].deltaX=0,wppaZoomableData[t].deltaY=0,wppaZoomableData[t].deltaFactor=1,wppaZoomableData[t].isLightbox?wppaZoomableData[t].run--:wppaZoomableData[t].run=4,r.buttondown=!1)}function w(a){for(var t,o,e,n,i,r,p,s,c,m,d,l=0;l<wppaZoomableData.length;l++){wppaZoomableData[l]&&wppaZoomableData[l].canvas&&!wppaZoomableData[l].abort&&(o=(t=wppaZoomableData[l]).imageRatio,t.isLightbox?(h("#wppa-overlay-ic").css("display",""),r=(n=!wppaIsFs())?(i=window.innerWidth?window.innerWidth:screen.width,window.innerHeight?window.innerHeight:screen.height):(i=screen.width,screen.height),p=parseInt(p),s=parseInt(s),d=(m=8)+(t.controls?t.icsize+10:0)+10,n?(m+=2*t.borderWidth,d+=2*t.borderWidth):m=40,n?c=(e=(i-m)/o<r-d)?(r-(s=(p=i-m)/o)-d)/2+20:(p=o*(r-(t.controls?t.icsize:0)-24),n&&(p-=24),s=p/o,20):(screenRatio=screen.width/screen.height,(e=screenRatio<o)?(p=(s=screen.height)*o,screen.width,c=0):(s=(p=screen.width)/o,c=(screen.height-s)/2,0)),h("#wppa-ovl-pan-container").css({marginTop:c}),h("#wppa-overlay-ic").css({marginTop:0}),t.canvasWidth=p,t.canvasHeight=s,t.canvas.width=t.canvasWidth,t.canvas.height=t.canvasHeight,n?(h("#wppa-ovl-pan-container").css({backgroundColor:t.backgroundColor,padding:t.padding,borderRadius:t.borderRadius,borderWidth:t.borderWidth,width:p,marginLeft:0}),h("#wppa-pctl-div-"+t.itemid).css({marginLeft:0}),e?h("#wppa-overlay-ic").css({left:4}):h("#wppa-overlay-ic").css({left:(i-p)/2})):(h("#wppa-overlay-ic").css({marginLeft:0}),h("#wppa-ovl-pan-container").css({backgroundColor:"transparent",padding:0,borderRadius:0,borderWidth:0,width:p,left:(i-p)/2,position:"fixed"}),h("#wppa-pctl-div-"+t.itemid).css({marginLeft:0}))):(t.canvasWidth=h(t.div).parent().width(),t.canvasHeight=t.canvasWidth/o,t.canvas.width=t.canvasWidth,t.canvas.height=t.canvasHeight),t.run=5,u(l))}}function f(a){a.preventDefault();var t,o,e=jQuery(this).attr("data-mocc");wppaZoomableData[e]&&(t=wppaZoomableData[e],wppaIsFs()&&(o=a.screenX,((o=a.screenY)<t.fsMaskLeft||o>t.fsMaskRight||Y<t.fsMaskTop||Y>t.fsMaskBottom)&&jQuery("#wppa-overlay-bg").trigger("click")),t.enableManual&&(t.manualControl=!0,t.savedCanvasX=a.offsetX,t.savedCanvasY=a.offsetY,t.run=5,u(e)))}function v(a){if(!r.isLightbox)return!0;if(!wppaIsFs())return!0;var t=a.touches[0].screenX,o=a.touches[0].screenY;return(t<r.fsMaskLeft||t>r.fsMaskRight||o<r.fsMaskTop||o>r.fsMaskBottom)&&jQuery("#wppa-overlay-bg").trigger("click"),!0}function g(a){var t,o,e,n,i=jQuery(this).attr("data-mocc");!wppaZoomableData[i]||(t=wppaZoomableData[i]).manualControl&&(o=t.canvas.width/t.fromWidth,e=(t.savedCanvasX-a.offsetX)/o+t.fromX,n=(t.savedCanvasY-a.offsetY)/o+t.fromY,0<e&&0<n&&e+t.fromWidth<t.image.width&&n+t.fromHeight<t.image.height&&(t.fromX=e,t.fromY=n,t.savedCanvasX=a.offsetX,t.savedCanvasY=a.offsetY))}function b(a){var t,o=jQuery(this).attr("data-mocc");!wppaZoomableData[o]||(t=wppaZoomableData[o]).manualControl&&(t.run=4,t.manualControl=!1)}a?setTimeout(function(){wppaDoZoomPan()},300):h("#wppa-ovl-spin").hide()}
13
  // wppa-touch
14
  var wppaJsTouchVersion="7.5.03",wppaTriggerElementID=null,wppaFingerCount=0,wppaStartX=0,wppaStartY=0,wppaCurX=0,wppaCurY=0,wppaDeltaX=0,wppaDeltaY=0,wppaHorzDiff=0,wppaVertDiff=0,wppaMinLength=72,wppaSwipeLength=0,wppaSwipeAngle=null,wppaSwipeDirection=null,wppaSwipeOnLightbox=!1,wppaSwipeMocc=0,wppaMobileTimeStart=0;function wppaStartTime(){var p=(new Date).getTime();return wppaMobileTimeStart=p,!0}function wppaInTime(){return(new Date).getTime()-wppaMobileTimeStart<250}function wppaTapLink(p,e){wppaInTime()&&(_bumpClickCount(p),document.location.href=e)}function wppaTouchStart(p,e,a){-1==(wppaSwipeMocc=a)&&(wppaSwipeOnLightbox=!0,p.preventDefault()),1==(wppaFingerCount=p.touches.length)?(wppaStartX=p.touches[0].pageX,wppaStartY=p.touches[0].pageY,wppaTriggerElementID=e):wppaTouchCancel()}function wppaTouchMove(p){wppaSwipeOnLightbox&&p.preventDefault(),1==p.touches.length?(wppaCurX=p.touches[0].pageX,wppaCurY=p.touches[0].pageY):wppaTouchCancel()}function wppaTouchEnd(p){wppaSwipeOnLightbox&&p.preventDefault(),1==wppaFingerCount&&0!=wppaCurX&&(wppaSwipeLength=Math.round(Math.sqrt(Math.pow(wppaCurX-wppaStartX,2)+Math.pow(wppaCurY-wppaStartY,2))),wppaMinLength<=wppaSwipeLength&&(wppaCalculateAngle(),wppaDetermineSwipeDirection(),wppaProcessingRoutine())),wppaTouchCancel()}function wppaTouchCancel(){wppaTriggerElementID=wppaSwipeDirection=wppaSwipeAngle=null,wppaSwipeOnLightbox=!1,wppaSwipeMocc=wppaSwipeLength=wppaVertDiff=wppaHorzDiff=wppaDeltaY=wppaDeltaX=wppaCurY=wppaCurX=wppaStartY=wppaStartX=wppaFingerCount=0}function wppaCalculateAngle(){var p=wppaStartX-wppaCurX,e=wppaCurY-wppaStartY,a=(Math.round(Math.sqrt(Math.pow(p,2)+Math.pow(e,2))),Math.atan2(e,p));(wppaSwipeAngle=Math.round(180*a/Math.PI))<0&&(wppaSwipeAngle=360-Math.abs(wppaSwipeAngle))}function wppaDetermineSwipeDirection(){wppaSwipeDirection=wppaSwipeAngle<=45&&0<=wppaSwipeAngle||wppaSwipeAngle<=360&&315<=wppaSwipeAngle?"left":135<=wppaSwipeAngle&&wppaSwipeAngle<=225?"right":45<wppaSwipeAngle&&wppaSwipeAngle<135?"down":"up"}function wppaProcessingRoutine(){document.getElementById(wppaTriggerElementID);if(wppaSwipeOnLightbox)"left"==wppaSwipeDirection?wppaOvlShowNext():"right"==wppaSwipeDirection&&wppaOvlShowPrev();else{if("right"==wppaSwipeDirection){if(idx=_wppaCurIdx[wppaSwipeMocc]-1,idx<0){if(!wppaSlideWrap)return;idx=_wppaSlides[wppaSwipeMocc].length-1}wppaGotoKeepState(wppaSwipeMocc,idx)}if("left"==wppaSwipeDirection){if(idx=_wppaCurIdx[wppaSwipeMocc]+1,idx==_wppaSlides[wppaSwipeMocc].length){if(!wppaSlideWrap)return;idx=0}wppaGotoKeepState(wppaSwipeMocc,idx)}}wppaTouchCancel()}
15
  // wppa-zoom
16
+ function wppaDoZoomPan(){for(var r,h=jQuery,a=!1,t=0;t<wppaZoomableData.length;t++)void 0!==wppaZoomableData[t]&&((r=wppaZoomableData[t]).image.complete?r.initialized||((r=wppaZoomableData[t]).manualControl=!1,r.deltaX=0,r.deltaY=0,r.deltaFactor=1,r.run=4,r.busy=!1,r.abort=!1,r.itemid=r.mocc+"-"+r.id,r.div=h("#wppa-pan-div-"+r.itemid),r.canvas=document.getElementById("wppa-pan-canvas-"+r.itemid),r.left=h("#wppa-pctl-left-"+r.itemid),r.right=h("#wppa-pctl-right-"+r.itemid),r.up=h("#wppa-pctl-up-"+r.itemid),r.down=h("#wppa-pctl-down-"+r.itemid),r.zoomin=h("#wppa-pctl-zoomin-"+r.itemid),r.zoomout=h("#wppa-pctl-zoomout-"+r.itemid),r.prev=h("#wppa-pctl-prev-"+r.itemid),r.next=h("#wppa-pctl-next-"+r.itemid),r.canvasWidth=r.width,r.canvasHeight=r.height,r.savedCanvasX=0,r.savedCanvasY=0,r.fromHeight=r.image.height,r.fromWidth=r.image.width,r.imageRatio=r.image.width/r.image.height,r.fromX=0,r.fromY=0,r.centerX=r.fromX+r.fromWidth/2,r.centerY=r.fromY+r.fromHeight/2,r.ctx=null,r.buttondown=!1,r.enableManual=!0,wppaIsMobile?(r.right.on("touchstart",n),r.right.on("touchend",l),r.left.on("touchstart",i),r.left.on("touchend",l),r.up.on("touchstart",p),r.up.on("touchend",l),r.down.on("touchstart",s),r.down.on("touchend",l),r.zoomin.on("touchstart",c),r.zoomin.on("touchend",l),r.zoomout.on("touchstart",m),r.zoomout.on("touchend",l),r.canvas.addEventListener("touchstart",v)):(r.canvas.addEventListener("mousedown",f),r.canvas.addEventListener("mousemove",g),r.canvas.addEventListener("mouseup",b),r.canvas.addEventListener("mouseout",b),document.getElementById("wppa-pan-canvas-"+r.itemid).addEventListener("wheel",d),r.right.on("mousedown",n),r.right.on("mouseup",l),r.left.on("mousedown",i),r.left.on("mouseup",l),r.up.on("mousedown",p),r.up.on("mouseup",l),r.down.on("mousedown",s),r.down.on("mouseup",l),r.zoomin.on("mousedown",c),r.zoomin.on("mouseup",l),r.zoomout.on("mousedown",m),r.zoomout.on("mouseup",l)),r.isLightbox&&(h("#wppa-fulls-btn").on("click",function(){abort=!0}),r.prev&&(r.prev.on("click",o),r.next.on("click",e))),h(window).on("DOMContentLoaded load resize orientationchange",w),u(t),w(),r.initialized=!0):a=!0);function u(a){if((r=wppaZoomableData[a]).isLightbox&&(wppaOvlOpen||(r.abort=!0)),r.abort)return r.ctx=null,void(r.prevctx=null);var t,o,e,n,i;0!=r.run&&(r.busy||(r.busy=!0,r.manualControl||(r.fromX+=r.deltaX,r.fromY+=r.deltaY,t=r.fromHeight/r.deltaFactor,o=r.fromWidth/r.deltaFactor,50<t&&1!=r.deltaFactor&&(wppaIsFs()||t<=r.image.height)&&(r.fromX-=(o-r.fromWidth)/2,r.fromY-=(t-r.fromHeight)/2,r.fromWidth=o,r.fromHeight=t)),r.fromX=Math.max(0,Math.min(r.image.width-r.fromWidth,r.fromX)),r.fromY=Math.max(0,Math.min(r.image.height-r.fromHeight,r.fromY)),e=screen.width/screen.height,n=(1-r.image.width/r.fromWidth)*r.canvas.width/2,i=(1-r.image.height/r.fromHeight)*r.canvas.height/2,r.ctx=r.canvas.getContext("2d"),e>r.imageRatio&&t>r.image.height&&wppaIsFs()||e<=r.imageRatio&&o>r.image.width&&wppaIsFs()?(r.enableManual=!1,r.ctx.clearRect(0,0,r.canvas.width,r.canvas.height),r.ctx.drawImage(r.image,r.fromX,r.fromY,r.fromWidth,r.fromHeight,n,i,r.canvas.width,r.canvas.height),jQuery(r.canvas).css({cursor:"default"})):(r.enableManual=!0,r.ctx.drawImage(r.image,r.fromX,r.fromY,r.fromWidth,r.fromHeight,0,0,r.canvas.width,r.canvas.height),jQuery(r.canvas).css({cursor:"grab"})),wppaIsFs()?(r.fsMaskTop=i-(r.canvas.height-screen.height)/2,r.fsMaskLeft=n-(r.canvas.width-screen.width)/2,r.fsMaskBottom=screen.height-r.fsMaskTop,r.fsMaskRight=screen.width-r.fsMaskLeft):(r.fsMaskTop=0,r.fsMaskLeft=0,r.fsMaskBottom=0,r.fsMaskRight=0),r.busy=!1,0<r.run&&(r.manualControl?setTimeout(function(){u(a)},25):r.buttondown&&setTimeout(function(){u(a)},5)),r.run<5&&r.run--,r.initializing&&(r.initializing=!1,r.run--),wppaAdjustControlbar()))}function o(a){var t;a.preventDefault(),this.abort=!0,t||(t=!0,h("#wppa-overlay-ic").css({display:"none"}),h("#wppa-ovl-spin").show(),wppaOvlShowPrev())}function e(a){var t;a.preventDefault(),this.abort=!0,t||(t=!0,h("#wppa-overlay-ic").css({display:"none"}),h("#wppa-ovl-spin").show(),wppaOvlShowNext())}function n(a){var t=jQuery(this).attr("data-mocc");wppaZoomableData[t]&&(a.preventDefault(),wppaZoomableData[t].run=5,wppaZoomableData[t].deltaX=3,r.buttondown=!0,u(t))}function i(a){var t=jQuery(this).attr("data-mocc");wppaZoomableData[t]&&(a.preventDefault(),wppaZoomableData[t].run=5,wppaZoomableData[t].deltaX=-3,r.buttondown=!0,u(t))}function p(a){var t=jQuery(this).attr("data-mocc");wppaZoomableData[t]&&(a.preventDefault(),wppaZoomableData[t].run=5,wppaZoomableData[t].deltaY=-3,r.buttondown=!0,u(t))}function s(a){var t=jQuery(this).attr("data-mocc");wppaZoomableData[t]&&(a.preventDefault(),wppaZoomableData[t].run=5,wppaZoomableData[t].deltaY=3,r.buttondown=!0,u(t))}function c(a){var t=jQuery(this).attr("data-mocc");wppaZoomableData[t]&&(a.preventDefault(),wppaZoomableData[t].run=5,wppaZoomableData[t].deltaFactor=1.005,r.buttondown=!0,u(t))}function m(a){var t=jQuery(this).attr("data-mocc");wppaZoomableData[t]&&(a.preventDefault(),wppaZoomableData[t].run=5,wppaZoomableData[t].deltaFactor=.995,r.buttondown=!0,u(t))}function d(a){var t=jQuery(this).attr("data-mocc");wppaZoomableData[t]&&(a.preventDefault(),wppaZoomableData[t].run=4,wppaZoomableData[t].deltaFactor=1+a.deltaY*wppaZoomableData[t].zoomsensitivity/(wppaIsChrome?1e4:1e3),u(t),setTimeout(function(){wppaZoomableData[t].deltaFactor=1},25),a.stopPropagation())}function l(a){var t=jQuery(this).attr("data-mocc");wppaZoomableData[t]&&(a.preventDefault(),wppaZoomableData[t].deltaX=0,wppaZoomableData[t].deltaY=0,wppaZoomableData[t].deltaFactor=1,wppaZoomableData[t].isLightbox?wppaZoomableData[t].run--:wppaZoomableData[t].run=4,r.buttondown=!1)}function w(a){for(var t,o,e,n,i,r,p,s,c,m,d,l=0;l<wppaZoomableData.length;l++){wppaZoomableData[l]&&wppaZoomableData[l].canvas&&!wppaZoomableData[l].abort&&(o=(t=wppaZoomableData[l]).imageRatio,t.isLightbox?(h("#wppa-overlay-ic").css("display",""),r=(n=!wppaIsFs())?(i=window.innerWidth?window.innerWidth:screen.width,window.innerHeight?window.innerHeight:screen.height):(i=screen.width,screen.height),p=parseInt(p),s=parseInt(s),d=(m=8)+(t.controls?t.icsize+10:0)+10,n?(m+=2*t.borderWidth,d+=2*t.borderWidth):m=40,n?c=(e=(i-m)/o<r-d)?(r-(s=(p=i-m)/o)-d)/2+20:(p=o*(r-(t.controls?t.icsize:0)-24),n&&(p-=24),s=p/o,20):(screenRatio=screen.width/screen.height,(e=screenRatio<o)?(p=(s=screen.height)*o,screen.width,c=0):(s=(p=screen.width)/o,c=(screen.height-s)/2,0)),h("#wppa-ovl-pan-container").css({marginTop:c}),h("#wppa-overlay-ic").css({marginTop:0}),t.canvasWidth=p,t.canvasHeight=s,t.canvas.width=t.canvasWidth,t.canvas.height=t.canvasHeight,n?(h("#wppa-ovl-pan-container").css({backgroundColor:t.backgroundColor,padding:t.padding,borderRadius:t.borderRadius,borderWidth:t.borderWidth,width:p,marginLeft:0}),h("#wppa-pctl-div-"+t.itemid).css({marginLeft:0}),e?h("#wppa-overlay-ic").css({left:4}):h("#wppa-overlay-ic").css({left:(i-p)/2})):(h("#wppa-overlay-ic").css({marginLeft:0}),h("#wppa-ovl-pan-container").css({backgroundColor:"transparent",padding:0,borderRadius:0,borderWidth:0,width:p,left:(i-p)/2,position:"fixed"}),h("#wppa-pctl-div-"+t.itemid).css({marginLeft:0}))):(t.canvasWidth=h(t.div).parent().width(),t.canvasHeight=t.canvasWidth/o,t.canvas.width=t.canvasWidth,t.canvas.height=t.canvasHeight),t.run=5,u(l))}}function f(a){a.preventDefault();var t,o,e,n=jQuery(this).attr("data-mocc");wppaZoomableData[n]&&(t=wppaZoomableData[n],wppaIsFs()&&(o=a.screenX,e=a.screenY,(o<t.fsMaskLeft||o>t.fsMaskRight||e<t.fsMaskTop||e>t.fsMaskBottom)&&jQuery("#wppa-overlay-bg").trigger("click")),t.enableManual&&(t.manualControl=!0,t.savedCanvasX=a.offsetX,t.savedCanvasY=a.offsetY,t.run=5,u(n)))}function v(a){if(!r.isLightbox)return!0;if(!wppaIsFs())return!0;var t=a.touches[0].screenX,o=a.touches[0].screenY;return(t<r.fsMaskLeft||t>r.fsMaskRight||o<r.fsMaskTop||o>r.fsMaskBottom)&&jQuery("#wppa-overlay-bg").trigger("click"),!0}function g(a){var t,o,e,n,i=jQuery(this).attr("data-mocc");!wppaZoomableData[i]||(t=wppaZoomableData[i]).manualControl&&(o=t.canvas.width/t.fromWidth,e=(t.savedCanvasX-a.offsetX)/o+t.fromX,n=(t.savedCanvasY-a.offsetY)/o+t.fromY,0<e&&0<n&&e+t.fromWidth<t.image.width&&n+t.fromHeight<t.image.height&&(t.fromX=e,t.fromY=n,t.savedCanvasX=a.offsetX,t.savedCanvasY=a.offsetY))}function b(a){var t,o=jQuery(this).attr("data-mocc");!wppaZoomableData[o]||(t=wppaZoomableData[o]).manualControl&&(t.run=4,t.manualControl=!1)}a?setTimeout(function(){wppaDoZoomPan()},300):h("#wppa-ovl-spin").hide()}
js/wppa-zoom.js CHANGED
@@ -57,7 +57,7 @@ function wppaDoZoomPan() {
57
  args.enableManual = true;
58
 
59
  // Install event listeners
60
- if ( args.isMobile ) {
61
  args.right.on("touchstart", onRightMouseDown);
62
  args.right.on("touchend", onButtonUp);
63
  args.left.on("touchstart", onLeftMouseDown);
@@ -542,7 +542,7 @@ function wppaDoZoomPan() {
542
  // If fs and outside image, transfer to wppa-overlay-bg
543
  if ( wppaIsFs() ) {
544
  var X = e.screenX;
545
- var X = e.screenY;
546
  if ( X < args.fsMaskLeft || X > args.fsMaskRight || Y < args.fsMaskTop || Y > args.fsMaskBottom ) {
547
  jQuery( '#wppa-overlay-bg' ).trigger( 'click' );
548
  }
57
  args.enableManual = true;
58
 
59
  // Install event listeners
60
+ if ( wppaIsMobile ) {
61
  args.right.on("touchstart", onRightMouseDown);
62
  args.right.on("touchend", onButtonUp);
63
  args.left.on("touchstart", onLeftMouseDown);
542
  // If fs and outside image, transfer to wppa-overlay-bg
543
  if ( wppaIsFs() ) {
544
  var X = e.screenX;
545
+ var Y = e.screenY;
546
  if ( X < args.fsMaskLeft || X > args.fsMaskRight || Y < args.fsMaskTop || Y > args.fsMaskBottom ) {
547
  jQuery( '#wppa-overlay-bg' ).trigger( 'click' );
548
  }
js/wppa-zoom.min.js CHANGED
@@ -1 +1 @@
1
- function wppaDoZoomPan(){for(var r,h=jQuery,a=!1,t=0;t<wppaZoomableData.length;t++)void 0!==wppaZoomableData[t]&&((r=wppaZoomableData[t]).image.complete?r.initialized||((r=wppaZoomableData[t]).manualControl=!1,r.deltaX=0,r.deltaY=0,r.deltaFactor=1,r.run=4,r.busy=!1,r.abort=!1,r.itemid=r.mocc+"-"+r.id,r.div=h("#wppa-pan-div-"+r.itemid),r.canvas=document.getElementById("wppa-pan-canvas-"+r.itemid),r.left=h("#wppa-pctl-left-"+r.itemid),r.right=h("#wppa-pctl-right-"+r.itemid),r.up=h("#wppa-pctl-up-"+r.itemid),r.down=h("#wppa-pctl-down-"+r.itemid),r.zoomin=h("#wppa-pctl-zoomin-"+r.itemid),r.zoomout=h("#wppa-pctl-zoomout-"+r.itemid),r.prev=h("#wppa-pctl-prev-"+r.itemid),r.next=h("#wppa-pctl-next-"+r.itemid),r.canvasWidth=r.width,r.canvasHeight=r.height,r.savedCanvasX=0,r.savedCanvasY=0,r.fromHeight=r.image.height,r.fromWidth=r.image.width,r.imageRatio=r.image.width/r.image.height,r.fromX=0,r.fromY=0,r.centerX=r.fromX+r.fromWidth/2,r.centerY=r.fromY+r.fromHeight/2,r.ctx=null,r.buttondown=!1,r.enableManual=!0,r.isMobile?(r.right.on("touchstart",n),r.right.on("touchend",l),r.left.on("touchstart",i),r.left.on("touchend",l),r.up.on("touchstart",p),r.up.on("touchend",l),r.down.on("touchstart",s),r.down.on("touchend",l),r.zoomin.on("touchstart",c),r.zoomin.on("touchend",l),r.zoomout.on("touchstart",m),r.zoomout.on("touchend",l),r.canvas.addEventListener("touchstart",v)):(r.canvas.addEventListener("mousedown",f),r.canvas.addEventListener("mousemove",g),r.canvas.addEventListener("mouseup",b),r.canvas.addEventListener("mouseout",b),document.getElementById("wppa-pan-canvas-"+r.itemid).addEventListener("wheel",d),r.right.on("mousedown",n),r.right.on("mouseup",l),r.left.on("mousedown",i),r.left.on("mouseup",l),r.up.on("mousedown",p),r.up.on("mouseup",l),r.down.on("mousedown",s),r.down.on("mouseup",l),r.zoomin.on("mousedown",c),r.zoomin.on("mouseup",l),r.zoomout.on("mousedown",m),r.zoomout.on("mouseup",l)),r.isLightbox&&(h("#wppa-fulls-btn").on("click",function(){abort=!0}),r.prev&&(r.prev.on("click",o),r.next.on("click",e))),h(window).on("DOMContentLoaded load resize orientationchange",w),u(t),w(),r.initialized=!0):a=!0);function u(a){if((r=wppaZoomableData[a]).isLightbox&&(wppaOvlOpen||(r.abort=!0)),r.abort)return r.ctx=null,void(r.prevctx=null);var t,o,e,n,i;0!=r.run&&(r.busy||(r.busy=!0,r.manualControl||(r.fromX+=r.deltaX,r.fromY+=r.deltaY,t=r.fromHeight/r.deltaFactor,o=r.fromWidth/r.deltaFactor,50<t&&1!=r.deltaFactor&&(wppaIsFs()||t<=r.image.height)&&(r.fromX-=(o-r.fromWidth)/2,r.fromY-=(t-r.fromHeight)/2,r.fromWidth=o,r.fromHeight=t)),r.fromX=Math.max(0,Math.min(r.image.width-r.fromWidth,r.fromX)),r.fromY=Math.max(0,Math.min(r.image.height-r.fromHeight,r.fromY)),e=screen.width/screen.height,n=(1-r.image.width/r.fromWidth)*r.canvas.width/2,i=(1-r.image.height/r.fromHeight)*r.canvas.height/2,r.ctx=r.canvas.getContext("2d"),e>r.imageRatio&&t>r.image.height&&wppaIsFs()||e<=r.imageRatio&&o>r.image.width&&wppaIsFs()?(r.enableManual=!1,r.ctx.clearRect(0,0,r.canvas.width,r.canvas.height),r.ctx.drawImage(r.image,r.fromX,r.fromY,r.fromWidth,r.fromHeight,n,i,r.canvas.width,r.canvas.height),jQuery(r.canvas).css({cursor:"default"})):(r.enableManual=!0,r.ctx.drawImage(r.image,r.fromX,r.fromY,r.fromWidth,r.fromHeight,0,0,r.canvas.width,r.canvas.height),jQuery(r.canvas).css({cursor:"grab"})),wppaIsFs()?(r.fsMaskTop=i-(r.canvas.height-screen.height)/2,r.fsMaskLeft=n-(r.canvas.width-screen.width)/2,r.fsMaskBottom=screen.height-r.fsMaskTop,r.fsMaskRight=screen.width-r.fsMaskLeft):(r.fsMaskTop=0,r.fsMaskLeft=0,r.fsMaskBottom=0,r.fsMaskRight=0),r.busy=!1,0<r.run&&(r.manualControl?setTimeout(function(){u(a)},25):r.buttondown&&setTimeout(function(){u(a)},5)),r.run<5&&r.run--,r.initializing&&(r.initializing=!1,r.run--),wppaAdjustControlbar()))}function o(a){var t;a.preventDefault(),this.abort=!0,t||(t=!0,h("#wppa-overlay-ic").css({display:"none"}),h("#wppa-ovl-spin").show(),wppaOvlShowPrev())}function e(a){var t;a.preventDefault(),this.abort=!0,t||(t=!0,h("#wppa-overlay-ic").css({display:"none"}),h("#wppa-ovl-spin").show(),wppaOvlShowNext())}function n(a){var t=jQuery(this).attr("data-mocc");wppaZoomableData[t]&&(a.preventDefault(),wppaZoomableData[t].run=5,wppaZoomableData[t].deltaX=3,r.buttondown=!0,u(t))}function i(a){var t=jQuery(this).attr("data-mocc");wppaZoomableData[t]&&(a.preventDefault(),wppaZoomableData[t].run=5,wppaZoomableData[t].deltaX=-3,r.buttondown=!0,u(t))}function p(a){var t=jQuery(this).attr("data-mocc");wppaZoomableData[t]&&(a.preventDefault(),wppaZoomableData[t].run=5,wppaZoomableData[t].deltaY=-3,r.buttondown=!0,u(t))}function s(a){var t=jQuery(this).attr("data-mocc");wppaZoomableData[t]&&(a.preventDefault(),wppaZoomableData[t].run=5,wppaZoomableData[t].deltaY=3,r.buttondown=!0,u(t))}function c(a){var t=jQuery(this).attr("data-mocc");wppaZoomableData[t]&&(a.preventDefault(),wppaZoomableData[t].run=5,wppaZoomableData[t].deltaFactor=1.005,r.buttondown=!0,u(t))}function m(a){var t=jQuery(this).attr("data-mocc");wppaZoomableData[t]&&(a.preventDefault(),wppaZoomableData[t].run=5,wppaZoomableData[t].deltaFactor=.995,r.buttondown=!0,u(t))}function d(a){var t=jQuery(this).attr("data-mocc");wppaZoomableData[t]&&(a.preventDefault(),wppaZoomableData[t].run=4,wppaZoomableData[t].deltaFactor=1+a.deltaY*wppaZoomableData[t].zoomsensitivity/(wppaIsChrome?1e4:1e3),u(t),setTimeout(function(){wppaZoomableData[t].deltaFactor=1},25),a.stopPropagation())}function l(a){var t=jQuery(this).attr("data-mocc");wppaZoomableData[t]&&(a.preventDefault(),wppaZoomableData[t].deltaX=0,wppaZoomableData[t].deltaY=0,wppaZoomableData[t].deltaFactor=1,wppaZoomableData[t].isLightbox?wppaZoomableData[t].run--:wppaZoomableData[t].run=4,r.buttondown=!1)}function w(a){for(var t,o,e,n,i,r,p,s,c,m,d,l=0;l<wppaZoomableData.length;l++){wppaZoomableData[l]&&wppaZoomableData[l].canvas&&!wppaZoomableData[l].abort&&(o=(t=wppaZoomableData[l]).imageRatio,t.isLightbox?(h("#wppa-overlay-ic").css("display",""),r=(n=!wppaIsFs())?(i=window.innerWidth?window.innerWidth:screen.width,window.innerHeight?window.innerHeight:screen.height):(i=screen.width,screen.height),p=parseInt(p),s=parseInt(s),d=(m=8)+(t.controls?t.icsize+10:0)+10,n?(m+=2*t.borderWidth,d+=2*t.borderWidth):m=40,n?c=(e=(i-m)/o<r-d)?(r-(s=(p=i-m)/o)-d)/2+20:(p=o*(r-(t.controls?t.icsize:0)-24),n&&(p-=24),s=p/o,20):(screenRatio=screen.width/screen.height,(e=screenRatio<o)?(p=(s=screen.height)*o,screen.width,c=0):(s=(p=screen.width)/o,c=(screen.height-s)/2,0)),h("#wppa-ovl-pan-container").css({marginTop:c}),h("#wppa-overlay-ic").css({marginTop:0}),t.canvasWidth=p,t.canvasHeight=s,t.canvas.width=t.canvasWidth,t.canvas.height=t.canvasHeight,n?(h("#wppa-ovl-pan-container").css({backgroundColor:t.backgroundColor,padding:t.padding,borderRadius:t.borderRadius,borderWidth:t.borderWidth,width:p,marginLeft:0}),h("#wppa-pctl-div-"+t.itemid).css({marginLeft:0}),e?h("#wppa-overlay-ic").css({left:4}):h("#wppa-overlay-ic").css({left:(i-p)/2})):(h("#wppa-overlay-ic").css({marginLeft:0}),h("#wppa-ovl-pan-container").css({backgroundColor:"transparent",padding:0,borderRadius:0,borderWidth:0,width:p,left:(i-p)/2,position:"fixed"}),h("#wppa-pctl-div-"+t.itemid).css({marginLeft:0}))):(t.canvasWidth=h(t.div).parent().width(),t.canvasHeight=t.canvasWidth/o,t.canvas.width=t.canvasWidth,t.canvas.height=t.canvasHeight),t.run=5,u(l))}}function f(a){a.preventDefault();var t,o,e=jQuery(this).attr("data-mocc");wppaZoomableData[e]&&(t=wppaZoomableData[e],wppaIsFs()&&(o=a.screenX,((o=a.screenY)<t.fsMaskLeft||o>t.fsMaskRight||Y<t.fsMaskTop||Y>t.fsMaskBottom)&&jQuery("#wppa-overlay-bg").trigger("click")),t.enableManual&&(t.manualControl=!0,t.savedCanvasX=a.offsetX,t.savedCanvasY=a.offsetY,t.run=5,u(e)))}function v(a){if(!r.isLightbox)return!0;if(!wppaIsFs())return!0;var t=a.touches[0].screenX,o=a.touches[0].screenY;return(t<r.fsMaskLeft||t>r.fsMaskRight||o<r.fsMaskTop||o>r.fsMaskBottom)&&jQuery("#wppa-overlay-bg").trigger("click"),!0}function g(a){var t,o,e,n,i=jQuery(this).attr("data-mocc");!wppaZoomableData[i]||(t=wppaZoomableData[i]).manualControl&&(o=t.canvas.width/t.fromWidth,e=(t.savedCanvasX-a.offsetX)/o+t.fromX,n=(t.savedCanvasY-a.offsetY)/o+t.fromY,0<e&&0<n&&e+t.fromWidth<t.image.width&&n+t.fromHeight<t.image.height&&(t.fromX=e,t.fromY=n,t.savedCanvasX=a.offsetX,t.savedCanvasY=a.offsetY))}function b(a){var t,o=jQuery(this).attr("data-mocc");!wppaZoomableData[o]||(t=wppaZoomableData[o]).manualControl&&(t.run=4,t.manualControl=!1)}a?setTimeout(function(){wppaDoZoomPan()},300):h("#wppa-ovl-spin").hide()}
1
+ function wppaDoZoomPan(){for(var r,h=jQuery,a=!1,t=0;t<wppaZoomableData.length;t++)void 0!==wppaZoomableData[t]&&((r=wppaZoomableData[t]).image.complete?r.initialized||((r=wppaZoomableData[t]).manualControl=!1,r.deltaX=0,r.deltaY=0,r.deltaFactor=1,r.run=4,r.busy=!1,r.abort=!1,r.itemid=r.mocc+"-"+r.id,r.div=h("#wppa-pan-div-"+r.itemid),r.canvas=document.getElementById("wppa-pan-canvas-"+r.itemid),r.left=h("#wppa-pctl-left-"+r.itemid),r.right=h("#wppa-pctl-right-"+r.itemid),r.up=h("#wppa-pctl-up-"+r.itemid),r.down=h("#wppa-pctl-down-"+r.itemid),r.zoomin=h("#wppa-pctl-zoomin-"+r.itemid),r.zoomout=h("#wppa-pctl-zoomout-"+r.itemid),r.prev=h("#wppa-pctl-prev-"+r.itemid),r.next=h("#wppa-pctl-next-"+r.itemid),r.canvasWidth=r.width,r.canvasHeight=r.height,r.savedCanvasX=0,r.savedCanvasY=0,r.fromHeight=r.image.height,r.fromWidth=r.image.width,r.imageRatio=r.image.width/r.image.height,r.fromX=0,r.fromY=0,r.centerX=r.fromX+r.fromWidth/2,r.centerY=r.fromY+r.fromHeight/2,r.ctx=null,r.buttondown=!1,r.enableManual=!0,wppaIsMobile?(r.right.on("touchstart",n),r.right.on("touchend",l),r.left.on("touchstart",i),r.left.on("touchend",l),r.up.on("touchstart",p),r.up.on("touchend",l),r.down.on("touchstart",s),r.down.on("touchend",l),r.zoomin.on("touchstart",c),r.zoomin.on("touchend",l),r.zoomout.on("touchstart",m),r.zoomout.on("touchend",l),r.canvas.addEventListener("touchstart",v)):(r.canvas.addEventListener("mousedown",f),r.canvas.addEventListener("mousemove",g),r.canvas.addEventListener("mouseup",b),r.canvas.addEventListener("mouseout",b),document.getElementById("wppa-pan-canvas-"+r.itemid).addEventListener("wheel",d),r.right.on("mousedown",n),r.right.on("mouseup",l),r.left.on("mousedown",i),r.left.on("mouseup",l),r.up.on("mousedown",p),r.up.on("mouseup",l),r.down.on("mousedown",s),r.down.on("mouseup",l),r.zoomin.on("mousedown",c),r.zoomin.on("mouseup",l),r.zoomout.on("mousedown",m),r.zoomout.on("mouseup",l)),r.isLightbox&&(h("#wppa-fulls-btn").on("click",function(){abort=!0}),r.prev&&(r.prev.on("click",o),r.next.on("click",e))),h(window).on("DOMContentLoaded load resize orientationchange",w),u(t),w(),r.initialized=!0):a=!0);function u(a){if((r=wppaZoomableData[a]).isLightbox&&(wppaOvlOpen||(r.abort=!0)),r.abort)return r.ctx=null,void(r.prevctx=null);var t,o,e,n,i;0!=r.run&&(r.busy||(r.busy=!0,r.manualControl||(r.fromX+=r.deltaX,r.fromY+=r.deltaY,t=r.fromHeight/r.deltaFactor,o=r.fromWidth/r.deltaFactor,50<t&&1!=r.deltaFactor&&(wppaIsFs()||t<=r.image.height)&&(r.fromX-=(o-r.fromWidth)/2,r.fromY-=(t-r.fromHeight)/2,r.fromWidth=o,r.fromHeight=t)),r.fromX=Math.max(0,Math.min(r.image.width-r.fromWidth,r.fromX)),r.fromY=Math.max(0,Math.min(r.image.height-r.fromHeight,r.fromY)),e=screen.width/screen.height,n=(1-r.image.width/r.fromWidth)*r.canvas.width/2,i=(1-r.image.height/r.fromHeight)*r.canvas.height/2,r.ctx=r.canvas.getContext("2d"),e>r.imageRatio&&t>r.image.height&&wppaIsFs()||e<=r.imageRatio&&o>r.image.width&&wppaIsFs()?(r.enableManual=!1,r.ctx.clearRect(0,0,r.canvas.width,r.canvas.height),r.ctx.drawImage(r.image,r.fromX,r.fromY,r.fromWidth,r.fromHeight,n,i,r.canvas.width,r.canvas.height),jQuery(r.canvas).css({cursor:"default"})):(r.enableManual=!0,r.ctx.drawImage(r.image,r.fromX,r.fromY,r.fromWidth,r.fromHeight,0,0,r.canvas.width,r.canvas.height),jQuery(r.canvas).css({cursor:"grab"})),wppaIsFs()?(r.fsMaskTop=i-(r.canvas.height-screen.height)/2,r.fsMaskLeft=n-(r.canvas.width-screen.width)/2,r.fsMaskBottom=screen.height-r.fsMaskTop,r.fsMaskRight=screen.width-r.fsMaskLeft):(r.fsMaskTop=0,r.fsMaskLeft=0,r.fsMaskBottom=0,r.fsMaskRight=0),r.busy=!1,0<r.run&&(r.manualControl?setTimeout(function(){u(a)},25):r.buttondown&&setTimeout(function(){u(a)},5)),r.run<5&&r.run--,r.initializing&&(r.initializing=!1,r.run--),wppaAdjustControlbar()))}function o(a){var t;a.preventDefault(),this.abort=!0,t||(t=!0,h("#wppa-overlay-ic").css({display:"none"}),h("#wppa-ovl-spin").show(),wppaOvlShowPrev())}function e(a){var t;a.preventDefault(),this.abort=!0,t||(t=!0,h("#wppa-overlay-ic").css({display:"none"}),h("#wppa-ovl-spin").show(),wppaOvlShowNext())}function n(a){var t=jQuery(this).attr("data-mocc");wppaZoomableData[t]&&(a.preventDefault(),wppaZoomableData[t].run=5,wppaZoomableData[t].deltaX=3,r.buttondown=!0,u(t))}function i(a){var t=jQuery(this).attr("data-mocc");wppaZoomableData[t]&&(a.preventDefault(),wppaZoomableData[t].run=5,wppaZoomableData[t].deltaX=-3,r.buttondown=!0,u(t))}function p(a){var t=jQuery(this).attr("data-mocc");wppaZoomableData[t]&&(a.preventDefault(),wppaZoomableData[t].run=5,wppaZoomableData[t].deltaY=-3,r.buttondown=!0,u(t))}function s(a){var t=jQuery(this).attr("data-mocc");wppaZoomableData[t]&&(a.preventDefault(),wppaZoomableData[t].run=5,wppaZoomableData[t].deltaY=3,r.buttondown=!0,u(t))}function c(a){var t=jQuery(this).attr("data-mocc");wppaZoomableData[t]&&(a.preventDefault(),wppaZoomableData[t].run=5,wppaZoomableData[t].deltaFactor=1.005,r.buttondown=!0,u(t))}function m(a){var t=jQuery(this).attr("data-mocc");wppaZoomableData[t]&&(a.preventDefault(),wppaZoomableData[t].run=5,wppaZoomableData[t].deltaFactor=.995,r.buttondown=!0,u(t))}function d(a){var t=jQuery(this).attr("data-mocc");wppaZoomableData[t]&&(a.preventDefault(),wppaZoomableData[t].run=4,wppaZoomableData[t].deltaFactor=1+a.deltaY*wppaZoomableData[t].zoomsensitivity/(wppaIsChrome?1e4:1e3),u(t),setTimeout(function(){wppaZoomableData[t].deltaFactor=1},25),a.stopPropagation())}function l(a){var t=jQuery(this).attr("data-mocc");wppaZoomableData[t]&&(a.preventDefault(),wppaZoomableData[t].deltaX=0,wppaZoomableData[t].deltaY=0,wppaZoomableData[t].deltaFactor=1,wppaZoomableData[t].isLightbox?wppaZoomableData[t].run--:wppaZoomableData[t].run=4,r.buttondown=!1)}function w(a){for(var t,o,e,n,i,r,p,s,c,m,d,l=0;l<wppaZoomableData.length;l++){wppaZoomableData[l]&&wppaZoomableData[l].canvas&&!wppaZoomableData[l].abort&&(o=(t=wppaZoomableData[l]).imageRatio,t.isLightbox?(h("#wppa-overlay-ic").css("display",""),r=(n=!wppaIsFs())?(i=window.innerWidth?window.innerWidth:screen.width,window.innerHeight?window.innerHeight:screen.height):(i=screen.width,screen.height),p=parseInt(p),s=parseInt(s),d=(m=8)+(t.controls?t.icsize+10:0)+10,n?(m+=2*t.borderWidth,d+=2*t.borderWidth):m=40,n?c=(e=(i-m)/o<r-d)?(r-(s=(p=i-m)/o)-d)/2+20:(p=o*(r-(t.controls?t.icsize:0)-24),n&&(p-=24),s=p/o,20):(screenRatio=screen.width/screen.height,(e=screenRatio<o)?(p=(s=screen.height)*o,screen.width,c=0):(s=(p=screen.width)/o,c=(screen.height-s)/2,0)),h("#wppa-ovl-pan-container").css({marginTop:c}),h("#wppa-overlay-ic").css({marginTop:0}),t.canvasWidth=p,t.canvasHeight=s,t.canvas.width=t.canvasWidth,t.canvas.height=t.canvasHeight,n?(h("#wppa-ovl-pan-container").css({backgroundColor:t.backgroundColor,padding:t.padding,borderRadius:t.borderRadius,borderWidth:t.borderWidth,width:p,marginLeft:0}),h("#wppa-pctl-div-"+t.itemid).css({marginLeft:0}),e?h("#wppa-overlay-ic").css({left:4}):h("#wppa-overlay-ic").css({left:(i-p)/2})):(h("#wppa-overlay-ic").css({marginLeft:0}),h("#wppa-ovl-pan-container").css({backgroundColor:"transparent",padding:0,borderRadius:0,borderWidth:0,width:p,left:(i-p)/2,position:"fixed"}),h("#wppa-pctl-div-"+t.itemid).css({marginLeft:0}))):(t.canvasWidth=h(t.div).parent().width(),t.canvasHeight=t.canvasWidth/o,t.canvas.width=t.canvasWidth,t.canvas.height=t.canvasHeight),t.run=5,u(l))}}function f(a){a.preventDefault();var t,o,e,n=jQuery(this).attr("data-mocc");wppaZoomableData[n]&&(t=wppaZoomableData[n],wppaIsFs()&&(o=a.screenX,e=a.screenY,(o<t.fsMaskLeft||o>t.fsMaskRight||e<t.fsMaskTop||e>t.fsMaskBottom)&&jQuery("#wppa-overlay-bg").trigger("click")),t.enableManual&&(t.manualControl=!0,t.savedCanvasX=a.offsetX,t.savedCanvasY=a.offsetY,t.run=5,u(n)))}function v(a){if(!r.isLightbox)return!0;if(!wppaIsFs())return!0;var t=a.touches[0].screenX,o=a.touches[0].screenY;return(t<r.fsMaskLeft||t>r.fsMaskRight||o<r.fsMaskTop||o>r.fsMaskBottom)&&jQuery("#wppa-overlay-bg").trigger("click"),!0}function g(a){var t,o,e,n,i=jQuery(this).attr("data-mocc");!wppaZoomableData[i]||(t=wppaZoomableData[i]).manualControl&&(o=t.canvas.width/t.fromWidth,e=(t.savedCanvasX-a.offsetX)/o+t.fromX,n=(t.savedCanvasY-a.offsetY)/o+t.fromY,0<e&&0<n&&e+t.fromWidth<t.image.width&&n+t.fromHeight<t.image.height&&(t.fromX=e,t.fromY=n,t.savedCanvasX=a.offsetX,t.savedCanvasY=a.offsetY))}function b(a){var t,o=jQuery(this).attr("data-mocc");!wppaZoomableData[o]||(t=wppaZoomableData[o]).manualControl&&(t.run=4,t.manualControl=!1)}a?setTimeout(function(){wppaDoZoomPan()},300):h("#wppa-ovl-spin").hide()}
wppa-picture.php CHANGED
@@ -1964,7 +1964,6 @@ function wppa_get_zoom_pan_html( $args ) {
1964
  isLightbox:' . ( $lightbox ? 'true' : 'false' ) . ',
1965
  image:image,
1966
  zoomsensitivity:' . $zoomsensitivity . ',
1967
- isMobile:' . ( wppa_is_mobile() ? 'true' : 'false' ) . ',
1968
  borderWidth:' . wppa_opt( 'ovl_border_width' ) . ',
1969
  controls:' . ( $controls ? 'true' : 'false' ) . ',
1970
  height:' . $height . ',
1964
  isLightbox:' . ( $lightbox ? 'true' : 'false' ) . ',
1965
  image:image,
1966
  zoomsensitivity:' . $zoomsensitivity . ',
 
1967
  borderWidth:' . wppa_opt( 'ovl_border_width' ) . ',
1968
  controls:' . ( $controls ? 'true' : 'false' ) . ',
1969
  height:' . $height . ',
wppa-settings-autosave.php CHANGED
@@ -27,7 +27,7 @@ global $wp_version;
27
  global $wppa_supported_camara_brands;
28
 
29
  // Start test area
30
-
31
  // End test area
32
 
33
  // Initialize
27
  global $wppa_supported_camara_brands;
28
 
29
  // Start test area
30
+
31
  // End test area
32
 
33
  // Initialize
wppa.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  * Plugin Name: WP Photo Album Plus
4
  * Description: Easily manage and display your photo albums and slideshows within your WordPress site.
5
- * Version: 7.5.07.003
6
  * Author: J.N. Breetvelt a.k.a. OpaJaap
7
  * Author URI: http://wppa.opajaap.nl/
8
  * Plugin URI: http://wordpress.org/extend/plugins/wp-photo-album-plus/
@@ -24,7 +24,7 @@ global $wp_version;
24
 
25
  /* WPPA GLOBALS */
26
  global $wppa_revno; $wppa_revno = '7507'; // WPPA db version
27
- global $wppa_api_version; $wppa_api_version = '7.5.07.003'; // WPPA software version
28
 
29
  /* Init page js data */
30
  global $wppa_js_page_data; $wppa_js_page_data = '';
2
  /*
3
  * Plugin Name: WP Photo Album Plus
4
  * Description: Easily manage and display your photo albums and slideshows within your WordPress site.
5
+ * Version: 7.5.07.004
6
  * Author: J.N. Breetvelt a.k.a. OpaJaap
7
  * Author URI: http://wppa.opajaap.nl/
8
  * Plugin URI: http://wordpress.org/extend/plugins/wp-photo-album-plus/
24
 
25
  /* WPPA GLOBALS */
26
  global $wppa_revno; $wppa_revno = '7507'; // WPPA db version
27
+ global $wppa_api_version; $wppa_api_version = '7.5.07.004'; // WPPA software version
28
 
29
  /* Init page js data */
30
  global $wppa_js_page_data; $wppa_js_page_data = '';