WP Photo Album Plus - Version 7.6.08.005

Version Description

= 7.6.07 =

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

Release Info

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

Code changes from version 7.6.08.004 to 7.6.08.005

js/wppa-all.js CHANGED
@@ -13,6 +13,6 @@ var wppaJsPopupVersion="7.5.03";function wppaPopUp(p,t,e,r,i,a,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
- var wppaJsZoomVersion="7.6.05.002";function wppaDoZoomPan(o){var m=jQuery,e=l(o);if(!e.initialized&&!e.abort){if(e.isLightbox&&m("#wppa-ovl-spin").show(),!e.image.complete)return wppaConsoleLog("Loading image "+o),void setTimeout(function(){wppaDoZoomPan(o)},200);wppaConsoleLog("Loading image "+o+" complete"),m(image).css({width:image.naturalWidth,height:image.naturalHeight,maxWidth:image.naturalWidth,maxHeight:image.naturalHeight}),e.manual=!1,e.deltaX=0,e.deltaY=0,e.deltaFactor=1,e.busy=!1,e.div=m("#wppa-pan-div-"+e.itemId),e.canvas=document.getElementById("wppa-pan-canvas-"+e.itemId),e.left=m("#wppa-pctl-left-"+e.itemId),e.right=m("#wppa-pctl-right-"+e.itemId),e.up=m("#wppa-pctl-up-"+e.itemId),e.down=m("#wppa-pctl-down-"+e.itemId),e.zoomin=m("#wppa-pctl-zoomin-"+e.itemId),e.zoomout=m("#wppa-pctl-zoomout-"+e.itemId),e.prev=m("#wppa-pctl-prev-"+e.itemId),e.next=m("#wppa-pctl-next-"+e.itemId),e.exit=m("#wppa-exit-btn-2"),e.canvasWidth=e.width,e.canvasHeight=e.height,e.savedCanvasX=0,e.savedCanvasY=0,e.fromHeight=e.image.height,e.fromWidth=e.image.width,e.imageRatio=e.image.width/e.image.height,e.fromX=0,e.fromY=0,e.centerX=e.fromX+e.fromWidth/2,e.centerY=e.fromY+e.fromHeight/2,e.ctx=null,e.buttondown=!1,e.enableManual=!0,e.ctrlbarUpdate=!0,e.pause=!1,e.time=0,wppaIsMobile?(e.right.on("touchstart",function(a){n(o)}),e.right.on("touchend",function(a){p(o)}),e.left.on("touchstart",function(a){i(o)}),e.left.on("touchend",function(a){p(o)}),e.up.on("touchstart",function(a){s(o)}),e.up.on("touchend",function(a){p(o)}),e.down.on("touchstart",function(a){r(o)}),e.down.on("touchend",function(a){p(o)}),e.zoomin.on("touchstart",function(a){c(o)}),e.zoomin.on("touchend",function(a){p(o)}),e.zoomout.on("touchstart",function(a){u(o)}),e.zoomout.on("touchend",function(a){p(o)}),e.canvas.addEventListener("touchstart",function(a){f(o,a)}),e.canvas.addEventListener("touchmove",function(a){g(o,a)}),e.canvas.addEventListener("touchend",function(a){w(o)})):(e.canvas.addEventListener("mousedown",function(a){f(o,a)}),e.canvas.addEventListener("mousemove",function(a){g(o,a)}),e.canvas.addEventListener("mouseup",function(a){w(o)}),e.canvas.addEventListener("mouseleave",function(a){(e=l(o)).manual&&l(o,{pause:!0})}),e.canvas.addEventListener("mouseenter",function(a){var t;l(t=o,{pause:!1}).manual&&h(t)}),document.getElementById("wppa-pan-canvas-"+e.itemId).addEventListener("wheel",function(a){var t,n;t=o,(n=a).preventDefault(),n.stopPropagation(),e=l(t),l(t,{deltaFactor:1+n.deltaY*e.zoomsensitivity/(wppaIsChrome?1e4:1e3),manual:!1,burrondown:!1}),h(t),setTimeout(function(){l(t,{deltaFactor:1})},25)}),e.right.on("mousedown",function(a){n(o)}),e.right.on("mouseup",function(a){p(o)}),e.left.on("mousedown",function(a){i(o)}),e.left.on("mouseup",function(a){p(o)}),e.up.on("mousedown",function(a){s(o)}),e.up.on("mouseup",function(a){p(o)}),e.down.on("mousedown",function(a){r(o)}),e.down.on("mouseup",function(a){p(o)}),e.zoomin.off("mousedown"),e.zoomin.on("mousedown",function(a){c(o)}),e.zoomin.off("mouseup"),e.zoomin.on("mouseup",function(a){p(o)}),e.zoomout.on("mousedown",function(a){u(o)}),e.zoomout.on("mouseup",function(a){p(o)})),e.isLightbox&&(m("body").on("quitimage",function(a){var t;t=o,wppaConsoleLog("Zoom Quit Image"),e=l(t,{abort:!0}),m(e.canvas).hide(),m("#wppa-pctl-div-"+e.itemId).hide()}),m("#wppa-pctl-div-"+e.itemId).on("click",function(a){wppaKillEvent(a)})),e.isLightbox?(m(window).off("resize",wppaOvlShowSame),m(window).on("resize",wppaOvlShowSame)):m(window).on("resize",function(a){t(o)}),t(o),e.initialized=!0,l(o,e),m("#wppa-ovl-spin").hide()}function h(a){var t,n,o,e,i,s=l(a);s.canvas&&(L()<s.time+10?wppaConsoleLog("Skipped render "+a):(l(a,{time:L()}),wppaConsoleLog("Zoom render "+a),(s.isLightbox&&!wppaOvlOpen||!s.isLightbox&&wppaOvlOpen)&&(s=l(0,{abort:!0})),s.abort?l(a,{manual:!1,buttondown:!1,pause:!1,ctx:null}):s.busy||(wppaDebugCounter++,(s=l(a,{busy:!0})).manual||(s.fromX+=s.deltaX,s.fromY+=s.deltaY,t=s.fromHeight/s.deltaFactor,n=s.fromWidth/s.deltaFactor,50<t&&1!=s.deltaFactor&&(wppaIsFs()||t<=s.image.height)&&(s.fromX-=(n-s.fromWidth)/2,s.fromY-=(t-s.fromHeight)/2,s.fromWidth=n,s.fromHeight=t)),s.fromX=Math.max(0,Math.min(s.image.width-s.fromWidth,s.fromX)),s.fromY=Math.max(0,Math.min(s.image.height-s.fromHeight,s.fromY)),o=screen.width/screen.height,e=(1-s.image.width/s.fromWidth)*s.canvas.width/2,i=(1-s.image.height/s.fromHeight)*s.canvas.height/2,s.ctx=s.canvas.getContext("2d"),o>s.imageRatio&&t>s.image.height&&wppaIsFs()||o<=s.imageRatio&&n>s.image.width&&wppaIsFs()?(s.enableManual=!1,s.ctx.clearRect(0,0,s.canvas.width,s.canvas.height),s.ctx.drawImage(s.image,s.fromX,s.fromY,s.fromWidth,s.fromHeight,e,i,s.canvas.width,s.canvas.height),jQuery(s.canvas).css({cursor:"default"})):(s.enableManual=!0,s.ctx.drawImage(s.image,s.fromX,s.fromY,s.fromWidth,s.fromHeight,0,0,s.canvas.width,s.canvas.height),jQuery(s.canvas).css({cursor:"grab"})),wppaIsFs()?(s.fsMaskTop=i-(s.canvas.height-screen.height)/2,s.fsMaskLeft=e-(s.canvas.width-screen.width)/2,s.fsMaskBottom=screen.height-s.fsMaskTop,s.fsMaskRight=screen.width-s.fsMaskLeft):(s.fsMaskTop=0,s.fsMaskLeft=0,s.fsMaskBottom=0,s.fsMaskRight=0),s.ctrlbarUpdate&&(wppaAdjustControlbar(),s.ctrlbarUpdate=!1),s.busy=!1,l(a,s),s.pause||!s.manual&&!s.buttondown||setTimeout(function(){h(a)},10),s.pause&&l(a,{pause:!1}))))}function t(a){var t,n,o,e,i,s,r,c,d,u=l(a);u&&(u.isLightbox?(m("#wppa-overlay-ic").css("display",""),e=(n=!wppaIsFs())?(o=window.innerWidth?window.innerWidth:screen.width,window.innerHeight?window.innerHeight:screen.height):(o=screen.width,screen.height),r=0,d=(c=8)+(u.controls?u.icsize+10:0)+10,n?(c+=2*u.borderWidth,d+=2*u.borderWidth):c=40,t=n?e-d>(o-c)/u.imageRatio:(screenRatio=screen.width/screen.height,screenRatio<u.imageRatio),n&&t&&(r=(e-(s=(i=o-c)/u.imageRatio)-d)/2+20),n&&!t&&(s=(i=u.imageRatio*(e-(u.controls?u.icsize:0)-48))/u.imageRatio,r=20),!n&&t&&(i=(s=screen.height)*u.imageRatio,r=0),n||t||(s=(i=screen.width)/u.imageRatio,r=(screen.height-s)/2),m("#wppa-ovl-pan-container").css({marginTop:r}),m("#wppa-overlay-ic").css({marginTop:0,marginLeft:0}),u.canvasWidth=i,u.canvasHeight=s,u.canvas.width=u.canvasWidth,u.canvas.height=u.canvasHeight,n?(m("#wppa-ovl-pan-container").css({backgroundColor:u.backgroundColor,padding:u.padding,borderRadius:u.borderRadius+"px",borderWidth:u.borderWidth+"px",width:i,marginLeft:0}),t?m("#wppa-overlay-ic").css({left:4}):m("#wppa-overlay-ic").css({left:(o-i)/2})):(m("#wppa-overlay-ic").css({marginLeft:0}),m("#wppa-ovl-pan-container").css({backgroundColor:"transparent",padding:0,borderRadius:"0px",borderWidth:"0px",width:i,left:(o-i)/2,position:"fixed"}))):(u.canvasWidth=m(u.div).parent().width(),u.canvasHeight=u.canvasWidth/u.imageRatio,u.canvas.width=u.canvasWidth,u.canvas.height=u.canvasHeight),u.ctrlbarUpdate=!0,l(a,u),setTimeout(function(){h(a)},250))}function n(a){var t=l(a),n=t.image.naturalWidth/t.canvas.width;n<1.5&&(n=1.5),l(a,{deltaX:n*=1.5,buttondown:!0,manual:!1}),h(a)}function i(a){var t=l(a),n=t.image.naturalWidth/t.canvas.width;n<1.5&&(n=1.5),l(a,{deltaX:-(n*=1.5),buttondown:!0,manual:!1}),h(a)}function s(a){var t=l(a),n=t.image.naturalHeight/t.canvas.height;n<1.5&&(n=1.5),l(a,{deltaY:-(n*=1.5),buttondown:!0,manual:!1}),h(a)}function r(a){var t=l(a),n=t.image.naturalHeight/t.canvas.height;n<1.5&&(n=1.5),l(a,{deltaY:n*=1.5,buttondown:!0,manual:!1}),h(a)}function c(a){l(a,{deltaFactor:1.005,buttondown:!0,manual:!1}),h(a)}function u(a){l(a,{deltaFactor:.995,buttondown:!0,manual:!1}),h(a)}function p(a){l(a,{deltaX:0,deltaY:0,deltaFactor:1,buttondown:!1})}function f(a,t){var n=l(a),o=v(t).X,e=v(t).Y;if(wppaIsFs()&&n.isLightbox&&(o<n.fsMaskLeft||o>n.fsMaskRight||e<n.fsMaskTop||e>n.fsMaskBottom))return l(0,{abort:!0}),void jQuery("#wppa-overlay-bg").trigger("click");n.enableManual&&(l(a,{manual:!0,savedCanvasX:o=b(a,t).X,savedCanvasY:e=b(a,t).Y,buttondown:!1}),h(a))}function g(a,t){var n,o,e,i=l(a),s=b(a,t).X,r=b(a,t).Y;i.manual&&(n=i.canvas.width/i.fromWidth,o=(i.savedCanvasX-s)/n+i.fromX,e=(i.savedCanvasY-r)/n+i.fromY,0<o&&0<e&&o+i.fromWidth<i.image.width&&e+i.fromHeight<i.image.height&&l(a,{fromX:o,fromY:e,savedCanvasX:s,savedCanvasY:r}))}function w(a){l(a,{manual:!1})}function l(a,t){if(!wppaZoomData[a])return!1;if(t)for(var n in t)wppaZoomData[a][n]=t[n];return wppaZoomData[a]}function v(a){var t,n;return n=wppaIsMobile?(t=a.touches[0].screenX,a.touches[0].screenY):(t=a.screenX,a.screenY),{X:t,Y:n}}function b(a,t){var n,o,e;return e=wppaIsMobile?(n=l(a),o=t.touches[0].screenX-n.fsMaskLeft,t.touches[0].screenY-n.fsMaskTop):(o=t.offsetX,t.offsetY),{X:o,Y:e}}function L(){return d=new Date,d.getTime()}}
17
  // wppa-spheric
18
- var wppaJsSphericVersion="7.6.08.004";function wppaDoSphericPan(t){var s=jQuery,c=v(t);function w(n){var e=v(n),t=wppaIsElementInViewport(s("#wppa-pan-div-"+n+" canvas"));if(e.manCtrl||!(b()<e.time+25))if(t){if(v(n,{time:b()}),e.isLightbox)(!wppaOvlOpen||wppaOvlActivePanorama!=e.id||wppaGlobalOvlPanoramaId>e.uId)&&(abort=!0);else if(!wppaIsElementInViewport(s("#wppa-pan-div-"+n)))return void setTimeout(function(){w(n)},200);e.abort||((e.butDown||e.manCtrl)&&e.autorun&&(e.autorun=!1,e.dX=0),0==e.dX&&0==e.dY&&0==e.dFov&&(e.pause=!0),e.butDown&&(e.pause=!1),e.fov+=e.dFov,e.fov=Math.max(20,Math.min(120,e.fov)),e.wppaCamera=new THREE.PerspectiveCamera(e.fov,e.aspect,1,1e3),e.wppaCamera.target=new THREE.Vector3(0,0,0),e.lon+=e.dX,e.lat+=e.dY,e.lat=Math.max(-85,Math.min(85,e.lat)),e.wppaCamera.target.x=500*Math.sin(THREE.Math.degToRad(90-e.lat))*Math.cos(THREE.Math.degToRad(e.lon)),e.wppaCamera.target.y=500*Math.cos(THREE.Math.degToRad(90-e.lat)),e.wppaCamera.target.z=500*Math.sin(THREE.Math.degToRad(90-e.lat))*Math.sin(THREE.Math.degToRad(e.lon)),e.wppaCamera.lookAt(e.wppaCamera.target),e.wppaRenderer&&e.wppaRenderer.render(e.wppaScene,e.wppaCamera),wppaAdjustControlbar(),s("#wppa-ovl-spin").hide(),e.manCtrl,(e.autorun||!e.pause&&(e.manCtrl||e.butDown))&&e.wppaRenderer&&(e.timer=setTimeout(function(){w(n)},25)),v(n,e))}else setTimeout(function(){w(n)},200)}function e(n){var e=!wppaIsFs();if(c=v(n)){if(c.isLightbox){if(!wppaOvlOpen)return;s("#wppa-overlay-ic").css("display",""),s("#wppa-overlay-ic").css("width","");var t,a,o=(e=!wppaIsFs())?(a=window.innerWidth||screen.width,window.innerHeight||screen.height):(a=screen.width,screen.height),p=8,i=8+(c.controls?c.icsize+10:0)+30;e&&(p+=2*c.borderWidth,i+=2*c.borderWidth),t=(a-p)/2+i<o,i=e?t?(o-(u=(r=a-p)/2)-i)/2+20:(r=2*(u=o-i),20):(r=screen.width,u=screen.height,0),c.aspect=r/u,s("#wppa-ovl-pan-container").css({top:i}),s("#wppa-overlay-ic").css({top:0}),e?(s("#wppa-ovl-pan-container").css({backgroundColor:c.backgroundColor,padding:c.padding+"px",borderRadius:c.borderRadius+"px",width:r,marginLeft:0}),t?s("#wppa-overlay-ic").css({left:4,marginLeft:0}):s("#wppa-overlay-ic").css({left:(a-r)/2,marginLeft:0})):(s("#wppa-overlay-ic").css({marginLeft:0}),s("#wppa-ovl-pan-container").css({backgroundColor:"transparent",padding:0,borderRadius:"0px",width:r,left:(a-r)/2})),c.wppaRenderer.setSize(r,u)}else{var r=s(c.div).parent().width(),u=parseInt(r/2);c.wppaRenderer.setSize(r,u)}c.width=r,c.height=u,v(n,c),c.timer=setTimeout(function(){w(n)},250)}}function a(n,e){e.preventDefault(),e.stopPropagation(),c=v(n,{manCtrl:!0,butDown:!1,autorun:!1,dX:0}),wppaIsMobile?v(n,{sX:e.touches[0].clientX,sY:e.touches[0].clientY}):v(n,{sX:e.clientX,sY:e.clientY}),v(n,{sLon:c.lon,sLat:c.lat}),w(n)}function o(n,e){e.preventDefault(),e.stopPropagation(),(c=v(n)).manCtrl&&(wppaIsMobile?v(n,{lon:.1*(c.sX-e.touches[0].clientX)+c.sLon,lat:.1*(e.touches[0].clientY-c.sY)+c.sLat,pause:!1}):v(n,{lon:.1*(c.sX-e.clientX)+c.sLon,lat:.1*(e.clientY-c.sY)+c.sLat,pause:!1}),w(n))}function p(n){v(n,{manCtrl:!1})}function i(n){c=v(n),v(n,{dFov:-.4*c.mFakt,butDown:!0}),w(n)}function r(n){c=v(n),v(n,{dFov:.4*c.mFakt,butDown:!0}),w(n)}function u(n){c=v(n),v(n,{dX:.2*c.mFakt,butDown:!0}),w(n)}function l(n){c=v(n),v(n,{dX:-.2*c.mFakt,butDown:!0}),w(n)}function h(n){c=v(n),v(n,{dY:.2*c.mFakt,butDown:!0}),w(n)}function m(n){c=v(n),v(n,{dY:-.2*c.mFakt,butDown:!0}),w(n)}function f(n){c=v(n),v(n,{dX:0,dY:0,dFov:0,butDown:!1})}function v(n,e){if(!wppaSphericData[n])return!1;if(e)for(var t in e)wppaSphericData[n][t]=e[t];return wppaSphericData[n]}function b(){return d=new Date,d.getTime()}c.initialized||c.abort||(c.isLightbox||wppaIsElementInViewport(s("#wppa-pan-div-"+t))?(c.wppaRenderer&&(c.wppaRenderer.state.reset(),c.wppaSphere.dispose(),c.wppaSphereMaterial.dispose(),c.texture.dispose()),c.isLightbox&&wppaOvlOpen&&s("#wppa-ovl-spin").show(),c.manCtrl=!1,c.butDown=!1,c.lon=180,c.lat=0,c.dFov=0,c.abort=!1,c.aspect=2,c.div=s("#wppa-pan-div-"+t),c.left=s("#wppa-pctl-left-"+t),c.right=s("#wppa-pctl-right-"+t),c.up=s("#wppa-pctl-up-"+t),c.down=s("#wppa-pctl-down-"+t),c.zoomin=s("#wppa-pctl-zoomin-"+t),c.zoomout=s("#wppa-pctl-zoomout-"+t),c.prev=s("#wppa-pctl-prev-"+t),c.next=s("#wppa-pctl-next-"+t),c.pause=!1,c.mFakt=wppaIsMobile?"2":"1",c.time=0,c.isLightbox&&(wppaGlobalOvlPanoramaId++,c.uId=wppaGlobalOvlPanoramaId),s(c.div).html(""),c.wppaRenderer=new THREE.WebGLRenderer,c.wppaRenderer.setSize(c.width,c.height),s(c.div).append(c.wppaRenderer.domElement),c.wppaScene=new THREE.Scene,c.wppaSphere=new THREE.SphereGeometry(100,100,40),c.wppaSphere.applyMatrix4((new THREE.Matrix4).makeScale(-1,1,1)),c.texture=(new THREE.TextureLoader).load(c.url),c.wppaSphereMaterial=new THREE.MeshBasicMaterial({map:c.texture}),c.wppaSphereMesh=new THREE.Mesh(c.wppaSphere,c.wppaSphereMaterial),c.wppaScene.add(c.wppaSphereMesh),wppaIsMobile?(c.right.on("touchstart",function(n){u(t)}),c.right.on("touchend",function(n){f(t)}),c.left.on("touchstart",function(n){l(t)}),c.left.on("touchend",function(n){f(t)}),c.up.on("touchstart",function(n){h(t)}),c.up.on("touchend",function(n){f(t)}),c.down.on("touchstart",function(n){m(t)}),c.down.on("touchend",function(n){f(t)}),c.zoomin.on("touchstart",function(n){i(t)}),c.zoomin.on("touchend",function(n){f(t)}),c.zoomout.on("touchstart",function(n){r(t)}),c.zoomout.on("touchend",function(n){f(t)}),c.enableManual&&(s("#wppa-pan-div-"+t+" canvas")[0].addEventListener("touchstart",function(n){a(t,n)}),s("#wppa-pan-div-"+t+" canvas")[0].addEventListener("touchmove",function(n){o(t,n)}),s("#wppa-pan-div-"+t+" canvas")[0].addEventListener("touchend",function(n){p(t)}))):(c.right.on("mousedown",function(n){u(t)}),c.right.on("mouseup",function(n){f(t)}),c.left.on("mousedown",function(n){l(t)}),c.left.on("mouseup",function(n){f(t)}),c.up.on("mousedown",function(n){h(t)}),c.up.on("mouseup",function(n){f(t)}),c.down.on("mousedown",function(n){m(t)}),c.down.on("mouseup",function(n){f(t)}),c.zoomin.off("mousedown"),c.zoomin.on("mousedown",function(n){i(t)}),c.zoomin.off("mouseup"),c.zoomin.on("mouseup",function(n){f(t)}),c.zoomout.on("mousedown",function(n){r(t)}),c.zoomout.on("mouseup",function(n){f(t)}),c.enableManual&&(s("#wppa-pan-div-"+t+" canvas").on("mousedown",function(n){a(t,n)}),s("#wppa-pan-div-"+t+" canvas").on("mousemove",function(n){o(t,n)}),s("#wppa-pan-div-"+t+" canvas").on("mouseup",function(n){p(t)}),s("#wppa-pan-div-"+t+" canvas")[0].addEventListener("wheel",function(n){var e;e=t,(n=n).preventDefault(),n.stopPropagation(),c=v(e),v(e,{manCtrl:!1,butDown:!1,autorun:!1,dX:0,dFov:-n.deltaY*c.zoomsensitivity/(wppaIsChrome?60:6)}),w(e),setTimeout(function(){v(e,{dFov:0})},25)}))),c.isLightbox&&(s("body").on("quitimage",function(n){var e;c=v(e=t,{abort:!0,autorun:!1}),clearTimeout(c.timer),s("#wppa-pan-div-"+e+" canvas").hide(),s("#wppa-pctl-div-"+e).hide()}),s("#wppa-pctl-div-"+t).on("click",function(n){wppaKillEvent(n)})),v(t,c),c.isLightbox?(s(window).off("wpparesizeend",wppaOvlShowSame),s(window).on("wpparesizeend",wppaOvlShowSame)):s(window).on("wpparesizeend",function(n){e(t)}),s(document).on("tabbychange",function(n){var e;e=t,c.wppaRenderer.state.reset(),c=v(e,{initialized:!1,abort:!0}),setTimeout(function(){v(e,{abort:!1}),wppaDoSphericPan(e)},200)}),e(t)):setTimeout(function(){wppaDoSphericPan(t)},400))}
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
+ var wppaJsZoomVersion="7.6.08.005";function wppaDoZoomPan(n,a){var m=jQuery;a&&(wppaZoomData[n]=a);var o=l(n);if(!o.initialized&&!o.abort){if(o.isLightbox&&m("#wppa-ovl-spin").show(),!o.image.complete)return wppaConsoleLog("Loading image "+n),void setTimeout(function(){wppaDoZoomPan(n)},200);wppaConsoleLog("Loading image "+n+" complete"),m(image).css({width:image.naturalWidth,height:image.naturalHeight,maxWidth:image.naturalWidth,maxHeight:image.naturalHeight}),o.manual=!1,o.deltaX=0,o.deltaY=0,o.deltaFactor=1,o.busy=!1,o.div=m("#wppa-pan-div-"+o.itemId),o.canvas=document.getElementById("wppa-pan-canvas-"+o.itemId),o.left=m("#wppa-pctl-left-"+o.itemId),o.right=m("#wppa-pctl-right-"+o.itemId),o.up=m("#wppa-pctl-up-"+o.itemId),o.down=m("#wppa-pctl-down-"+o.itemId),o.zoomin=m("#wppa-pctl-zoomin-"+o.itemId),o.zoomout=m("#wppa-pctl-zoomout-"+o.itemId),o.prev=m("#wppa-pctl-prev-"+o.itemId),o.next=m("#wppa-pctl-next-"+o.itemId),o.exit=m("#wppa-exit-btn-2"),o.canvasWidth=o.width,o.canvasHeight=o.height,o.savedCanvasX=0,o.savedCanvasY=0,o.fromHeight=o.image.height,o.fromWidth=o.image.width,o.imageRatio=o.image.width/o.image.height,o.fromX=0,o.fromY=0,o.centerX=o.fromX+o.fromWidth/2,o.centerY=o.fromY+o.fromHeight/2,o.ctx=null,o.buttondown=!1,o.enableManual=!0,o.ctrlbarUpdate=!0,o.pause=!1,o.time=0,wppaIsMobile?(o.right.on("touchstart",function(a){e(n)}),o.right.on("touchend",function(a){h(n)}),o.left.on("touchstart",function(a){i(n)}),o.left.on("touchend",function(a){h(n)}),o.up.on("touchstart",function(a){s(n)}),o.up.on("touchend",function(a){h(n)}),o.down.on("touchstart",function(a){r(n)}),o.down.on("touchend",function(a){h(n)}),o.zoomin.on("touchstart",function(a){c(n)}),o.zoomin.on("touchend",function(a){h(n)}),o.zoomout.on("touchstart",function(a){u(n)}),o.zoomout.on("touchend",function(a){h(n)}),o.canvas&&(o.canvas.addEventListener("touchstart",function(a){f(n,a)}),o.canvas.addEventListener("touchmove",function(a){g(n,a)}),o.canvas.addEventListener("touchend",function(a){w(n)}))):(o.canvas&&(o.canvas.addEventListener("mousedown",function(a){f(n,a)}),o.canvas.addEventListener("mousemove",function(a){g(n,a)}),o.canvas.addEventListener("mouseup",function(a){w(n)}),o.canvas.addEventListener("mouseleave",function(a){(o=l(n)).manual&&l(n,{pause:!0})}),o.canvas.addEventListener("mouseenter",function(a){var t;l(t=n,{pause:!1}).manual&&p(t)}),document.getElementById("wppa-pan-canvas-"+o.itemId).addEventListener("wheel",function(a){var t;t=n,(a=a).preventDefault(),a.stopPropagation(),o=l(t),l(t,{deltaFactor:1+a.deltaY*o.zoomsensitivity/(wppaIsChrome?1e4:1e3),manual:!1,burrondown:!1}),p(t),setTimeout(function(){l(t,{deltaFactor:1})},25)})),o.right.on("mousedown",function(a){e(n)}),o.right.on("mouseup",function(a){h(n)}),o.left.on("mousedown",function(a){i(n)}),o.left.on("mouseup",function(a){h(n)}),o.up.on("mousedown",function(a){s(n)}),o.up.on("mouseup",function(a){h(n)}),o.down.on("mousedown",function(a){r(n)}),o.down.on("mouseup",function(a){h(n)}),o.zoomin.off("mousedown"),o.zoomin.on("mousedown",function(a){c(n)}),o.zoomin.off("mouseup"),o.zoomin.on("mouseup",function(a){h(n)}),o.zoomout.on("mousedown",function(a){u(n)}),o.zoomout.on("mouseup",function(a){h(n)})),o.isLightbox&&(m("body").on("quitimage",function(a){var t;t=n,wppaConsoleLog("Zoom Quit Image"),o=l(t,{abort:!0}),m(o.canvas).hide(),m("#wppa-pctl-div-"+o.itemId).hide()}),m("#wppa-pctl-div-"+o.itemId).on("click",function(a){wppaKillEvent(a)})),o.isLightbox?(m(window).off("resize",wppaOvlShowSame),m(window).on("resize",wppaOvlShowSame)):m(window).on("resize",function(a){t(n)}),t(n),o.initialized=!0,l(n,o),m("#wppa-ovl-spin").hide()}function p(a){var t,n,o,e,i,s=l(a);s.canvas&&(L()<s.time+10?wppaConsoleLog("Skipped render "+a):(l(a,{time:L()}),wppaConsoleLog("Zoom render "+a),(s.isLightbox&&!wppaOvlOpen||!s.isLightbox&&wppaOvlOpen)&&(s=l(0,{abort:!0})),s.abort?l(a,{manual:!1,buttondown:!1,pause:!1,ctx:null}):s.busy||(wppaDebugCounter++,(s=l(a,{busy:!0})).manual||(s.fromX+=s.deltaX,s.fromY+=s.deltaY,t=s.fromHeight/s.deltaFactor,n=s.fromWidth/s.deltaFactor,50<t&&1!=s.deltaFactor&&(wppaIsFs()||t<=s.image.height)&&(s.fromX-=(n-s.fromWidth)/2,s.fromY-=(t-s.fromHeight)/2,s.fromWidth=n,s.fromHeight=t)),s.fromX=Math.max(0,Math.min(s.image.width-s.fromWidth,s.fromX)),s.fromY=Math.max(0,Math.min(s.image.height-s.fromHeight,s.fromY)),o=screen.width/screen.height,e=(1-s.image.width/s.fromWidth)*s.canvas.width/2,i=(1-s.image.height/s.fromHeight)*s.canvas.height/2,s.ctx=s.canvas.getContext("2d"),o>s.imageRatio&&t>s.image.height&&wppaIsFs()||o<=s.imageRatio&&n>s.image.width&&wppaIsFs()?(s.enableManual=!1,s.ctx.clearRect(0,0,s.canvas.width,s.canvas.height),s.ctx.drawImage(s.image,s.fromX,s.fromY,s.fromWidth,s.fromHeight,e,i,s.canvas.width,s.canvas.height),jQuery(s.canvas).css({cursor:"default"})):(s.enableManual=!0,s.ctx.drawImage(s.image,s.fromX,s.fromY,s.fromWidth,s.fromHeight,0,0,s.canvas.width,s.canvas.height),jQuery(s.canvas).css({cursor:"grab"})),wppaIsFs()?(s.fsMaskTop=i-(s.canvas.height-screen.height)/2,s.fsMaskLeft=e-(s.canvas.width-screen.width)/2,s.fsMaskBottom=screen.height-s.fsMaskTop,s.fsMaskRight=screen.width-s.fsMaskLeft):(s.fsMaskTop=0,s.fsMaskLeft=0,s.fsMaskBottom=0,s.fsMaskRight=0),s.ctrlbarUpdate&&(wppaAdjustControlbar(),s.ctrlbarUpdate=!1),s.busy=!1,l(a,s),s.pause||!s.manual&&!s.buttondown||setTimeout(function(){p(a)},10),s.pause&&l(a,{pause:!1}))))}function t(a){var t,n,o,e,i,s,r,c,d,u=l(a);u&&(u.isLightbox?(m("#wppa-overlay-ic").css("display",""),e=(n=!wppaIsFs())?(o=window.innerWidth||screen.width,window.innerHeight||screen.height):(o=screen.width,screen.height),r=0,d=(c=8)+(u.controls?u.icsize+10:0)+10,n?(c+=2*u.borderWidth,d+=2*u.borderWidth):c=40,t=n?e-d>(o-c)/u.imageRatio:(screenRatio=screen.width/screen.height,screenRatio<u.imageRatio),n&&t&&(r=(e-(s=(i=o-c)/u.imageRatio)-d)/2+20),n&&!t&&(s=(i=u.imageRatio*(e-(u.controls?u.icsize:0)-48))/u.imageRatio,r=20),!n&&t&&(i=(s=screen.height)*u.imageRatio,r=0),n||t||(s=(i=screen.width)/u.imageRatio,r=(screen.height-s)/2),m("#wppa-ovl-pan-container").css({marginTop:r}),m("#wppa-overlay-ic").css({marginTop:0,marginLeft:0}),u.canvasWidth=i,u.canvasHeight=s,u.canvas.width=u.canvasWidth,u.canvas.height=u.canvasHeight,n?(m("#wppa-ovl-pan-container").css({backgroundColor:u.backgroundColor,padding:u.padding,borderRadius:u.borderRadius+"px",borderWidth:u.borderWidth+"px",width:i,marginLeft:0}),t?m("#wppa-overlay-ic").css({left:4}):m("#wppa-overlay-ic").css({left:(o-i)/2})):(m("#wppa-overlay-ic").css({marginLeft:0}),m("#wppa-ovl-pan-container").css({backgroundColor:"transparent",padding:0,borderRadius:"0px",borderWidth:"0px",width:i,left:(o-i)/2,position:"fixed"}))):(u.canvasWidth=m(u.div).parent().width(),u.canvasHeight=u.canvasWidth/u.imageRatio,u.canvas.width=u.canvasWidth,u.canvas.height=u.canvasHeight),u.ctrlbarUpdate=!0,l(a,u),setTimeout(function(){p(a)},250))}function e(a){var t=l(a),t=t.image.naturalWidth/t.canvas.width;t<1.5&&(t=1.5),l(a,{deltaX:t*=1.5,buttondown:!0,manual:!1}),p(a)}function i(a){var t=l(a),t=t.image.naturalWidth/t.canvas.width;t<1.5&&(t=1.5),l(a,{deltaX:-(t*=1.5),buttondown:!0,manual:!1}),p(a)}function s(a){var t=l(a),t=t.image.naturalHeight/t.canvas.height;t<1.5&&(t=1.5),l(a,{deltaY:-(t*=1.5),buttondown:!0,manual:!1}),p(a)}function r(a){var t=l(a),t=t.image.naturalHeight/t.canvas.height;t<1.5&&(t=1.5),l(a,{deltaY:t*=1.5,buttondown:!0,manual:!1}),p(a)}function c(a){l(a,{deltaFactor:1.005,buttondown:!0,manual:!1}),p(a)}function u(a){l(a,{deltaFactor:.995,buttondown:!0,manual:!1}),p(a)}function h(a){l(a,{deltaX:0,deltaY:0,deltaFactor:1,buttondown:!1})}function f(a,t){var n=l(a),o=v(t).X,e=v(t).Y;if(wppaIsFs()&&n.isLightbox&&(o<n.fsMaskLeft||o>n.fsMaskRight||e<n.fsMaskTop||e>n.fsMaskBottom))return l(0,{abort:!0}),void jQuery("#wppa-overlay-bg").trigger("click");n.enableManual&&(l(a,{manual:!0,savedCanvasX:o=b(a,t).X,savedCanvasY:e=b(a,t).Y,buttondown:!1}),p(a))}function g(a,t){var n,o=l(a),e=b(a,t).X,i=b(a,t).Y;o.manual&&(n=o.canvas.width/o.fromWidth,t=(o.savedCanvasX-e)/n+o.fromX,n=(o.savedCanvasY-i)/n+o.fromY,0<t&&0<n&&t+o.fromWidth<o.image.width&&n+o.fromHeight<o.image.height&&l(a,{fromX:t,fromY:n,savedCanvasX:e,savedCanvasY:i}))}function w(a){l(a,{manual:!1})}function l(a,t){if(!wppaZoomData[a])return!1;if(t)for(var n in t)wppaZoomData[a][n]=t[n];return wppaZoomData[a]}function v(a){var t;return a=wppaIsMobile?(t=a.touches[0].screenX,a.touches[0].screenY):(t=a.screenX,a.screenY),{X:t,Y:a}}function b(a,t){var n;return t=wppaIsMobile?(a=l(a),n=t.touches[0].screenX-a.fsMaskLeft,t.touches[0].screenY-a.fsMaskTop):(n=t.offsetX,t.offsetY),{X:n,Y:t}}function L(){return d=new Date,d.getTime()}}
17
  // wppa-spheric
18
+ var wppaJsSphericVersion="7.6.08.005";function wppaDoSphericPan(a,n){var s=jQuery;n&&(wppaSphericData[a]=n);var c=v(a,c);function w(n){var e=v(n),a=wppaIsElementInViewport(s("#wppa-pan-div-"+n+" canvas"));if(e.manCtrl||!(b()<e.time+25))if(a){if(v(n,{time:b()}),e.isLightbox)(!wppaOvlOpen||wppaOvlActivePanorama!=e.id||wppaGlobalOvlPanoramaId>e.uId)&&(abort=!0);else if(!wppaIsElementInViewport(s("#wppa-pan-div-"+n)))return void setTimeout(function(){w(n)},200);e.abort||((e.butDown||e.manCtrl)&&e.autorun&&(e.autorun=!1,e.dX=0),0==e.dX&&0==e.dY&&0==e.dFov&&(e.pause=!0),e.butDown&&(e.pause=!1),e.fov+=e.dFov,e.fov=Math.max(20,Math.min(120,e.fov)),e.wppaCamera=new THREE.PerspectiveCamera(e.fov,e.aspect,1,1e3),e.wppaCamera.target=new THREE.Vector3(0,0,0),e.lon+=e.dX,e.lat+=e.dY,e.lat=Math.max(-85,Math.min(85,e.lat)),e.wppaCamera.target.x=500*Math.sin(THREE.Math.degToRad(90-e.lat))*Math.cos(THREE.Math.degToRad(e.lon)),e.wppaCamera.target.y=500*Math.cos(THREE.Math.degToRad(90-e.lat)),e.wppaCamera.target.z=500*Math.sin(THREE.Math.degToRad(90-e.lat))*Math.sin(THREE.Math.degToRad(e.lon)),e.wppaCamera.lookAt(e.wppaCamera.target),e.wppaRenderer&&e.wppaRenderer.render(e.wppaScene,e.wppaCamera),wppaAdjustControlbar(),s("#wppa-ovl-spin").hide(),e.manCtrl,(e.autorun||!e.pause&&(e.manCtrl||e.butDown))&&e.wppaRenderer&&(e.timer=setTimeout(function(){w(n)},25)),v(n,e))}else setTimeout(function(){w(n)},200)}function e(n){var e=!wppaIsFs();if(c=v(n)){if(c.isLightbox){if(!wppaOvlOpen)return;s("#wppa-overlay-ic").css("display",""),s("#wppa-overlay-ic").css("width","");var a,t,o=(e=!wppaIsFs())?(t=window.innerWidth||screen.width,window.innerHeight||screen.height):(t=screen.width,screen.height),p=8,i=8+(c.controls?c.icsize+10:0)+30;e&&(p+=2*c.borderWidth,i+=2*c.borderWidth),a=(t-p)/2+i<o,i=e?a?(o-(u=(r=t-p)/2)-i)/2+20:(r=2*(u=o-i),20):(r=screen.width,u=screen.height,0),c.aspect=r/u,s("#wppa-ovl-pan-container").css({top:i}),s("#wppa-overlay-ic").css({top:0}),e?(s("#wppa-ovl-pan-container").css({backgroundColor:c.backgroundColor,padding:c.padding+"px",borderRadius:c.borderRadius+"px",width:r,marginLeft:0}),a?s("#wppa-overlay-ic").css({left:4,marginLeft:0}):s("#wppa-overlay-ic").css({left:(t-r)/2,marginLeft:0})):(s("#wppa-overlay-ic").css({marginLeft:0}),s("#wppa-ovl-pan-container").css({backgroundColor:"transparent",padding:0,borderRadius:"0px",width:r,left:(t-r)/2})),c.wppaRenderer.setSize(r,u)}else{var r=s(c.div).parent().width(),u=parseInt(r/2);c.wppaRenderer.setSize(r,u)}c.width=r,c.height=u,v(n,c),c.timer=setTimeout(function(){w(n)},250)}}function t(n,e){e.preventDefault(),e.stopPropagation(),c=v(n,{manCtrl:!0,butDown:!1,autorun:!1,dX:0}),wppaIsMobile?v(n,{sX:e.touches[0].clientX,sY:e.touches[0].clientY}):v(n,{sX:e.clientX,sY:e.clientY}),v(n,{sLon:c.lon,sLat:c.lat}),w(n)}function o(n,e){e.preventDefault(),e.stopPropagation(),(c=v(n)).manCtrl&&(wppaIsMobile?v(n,{lon:.1*(c.sX-e.touches[0].clientX)+c.sLon,lat:.1*(e.touches[0].clientY-c.sY)+c.sLat,pause:!1}):v(n,{lon:.1*(c.sX-e.clientX)+c.sLon,lat:.1*(e.clientY-c.sY)+c.sLat,pause:!1}),w(n))}function p(n){v(n,{manCtrl:!1})}function i(n){c=v(n),v(n,{dFov:-.4*c.mFakt,butDown:!0}),w(n)}function r(n){c=v(n),v(n,{dFov:.4*c.mFakt,butDown:!0}),w(n)}function u(n){c=v(n),v(n,{dX:.2*c.mFakt,butDown:!0}),w(n)}function l(n){c=v(n),v(n,{dX:-.2*c.mFakt,butDown:!0}),w(n)}function h(n){c=v(n),v(n,{dY:.2*c.mFakt,butDown:!0}),w(n)}function m(n){c=v(n),v(n,{dY:-.2*c.mFakt,butDown:!0}),w(n)}function f(n){c=v(n),v(n,{dX:0,dY:0,dFov:0,butDown:!1})}function v(n,e){if(!wppaSphericData[n])return!1;if(e)for(var a in e)wppaSphericData[n][a]=e[a];return wppaSphericData[n]}function b(){return d=new Date,d.getTime()}c.initialized||c.abort||(c.isLightbox||wppaIsElementInViewport(s("#wppa-pan-div-"+a))?(c.wppaRenderer&&(c.wppaRenderer.state.reset(),c.wppaSphere.dispose(),c.wppaSphereMaterial.dispose(),c.texture.dispose()),c.isLightbox&&wppaOvlOpen&&s("#wppa-ovl-spin").show(),c.manCtrl=!1,c.butDown=!1,c.lon=180,c.lat=0,c.dFov=0,c.abort=!1,c.aspect=2,c.div=s("#wppa-pan-div-"+a),c.left=s("#wppa-pctl-left-"+a),c.right=s("#wppa-pctl-right-"+a),c.up=s("#wppa-pctl-up-"+a),c.down=s("#wppa-pctl-down-"+a),c.zoomin=s("#wppa-pctl-zoomin-"+a),c.zoomout=s("#wppa-pctl-zoomout-"+a),c.prev=s("#wppa-pctl-prev-"+a),c.next=s("#wppa-pctl-next-"+a),c.pause=!1,c.mFakt=wppaIsMobile?"2":"1",c.time=0,c.isLightbox&&(wppaGlobalOvlPanoramaId++,c.uId=wppaGlobalOvlPanoramaId),s(c.div).html(""),c.wppaRenderer=new THREE.WebGLRenderer,c.wppaRenderer.setSize(c.width,c.height),s(c.div).append(c.wppaRenderer.domElement),c.wppaScene=new THREE.Scene,c.wppaSphere=new THREE.SphereGeometry(100,100,40),c.wppaSphere.applyMatrix4((new THREE.Matrix4).makeScale(-1,1,1)),c.texture=(new THREE.TextureLoader).load(c.url),c.wppaSphereMaterial=new THREE.MeshBasicMaterial({map:c.texture}),c.wppaSphereMesh=new THREE.Mesh(c.wppaSphere,c.wppaSphereMaterial),c.wppaScene.add(c.wppaSphereMesh),wppaIsMobile?(c.right.on("touchstart",function(n){u(a)}),c.right.on("touchend",function(n){f(a)}),c.left.on("touchstart",function(n){l(a)}),c.left.on("touchend",function(n){f(a)}),c.up.on("touchstart",function(n){h(a)}),c.up.on("touchend",function(n){f(a)}),c.down.on("touchstart",function(n){m(a)}),c.down.on("touchend",function(n){f(a)}),c.zoomin.on("touchstart",function(n){i(a)}),c.zoomin.on("touchend",function(n){f(a)}),c.zoomout.on("touchstart",function(n){r(a)}),c.zoomout.on("touchend",function(n){f(a)}),c.enableManual&&0<s("#wppa-pan-div-"+a+" canvas").length&&(s("#wppa-pan-div-"+a+" canvas")[0].addEventListener("touchstart",function(n){t(a,n)}),s("#wppa-pan-div-"+a+" canvas")[0].addEventListener("touchmove",function(n){o(a,n)}),s("#wppa-pan-div-"+a+" canvas")[0].addEventListener("touchend",function(n){p(a)}))):(c.right.on("mousedown",function(n){u(a)}),c.right.on("mouseup",function(n){f(a)}),c.left.on("mousedown",function(n){l(a)}),c.left.on("mouseup",function(n){f(a)}),c.up.on("mousedown",function(n){h(a)}),c.up.on("mouseup",function(n){f(a)}),c.down.on("mousedown",function(n){m(a)}),c.down.on("mouseup",function(n){f(a)}),c.zoomin.off("mousedown"),c.zoomin.on("mousedown",function(n){i(a)}),c.zoomin.off("mouseup"),c.zoomin.on("mouseup",function(n){f(a)}),c.zoomout.on("mousedown",function(n){r(a)}),c.zoomout.on("mouseup",function(n){f(a)}),c.enableManual&&0<s("#wppa-pan-div-"+a+" canvas").length&&(s("#wppa-pan-div-"+a+" canvas").on("mousedown",function(n){t(a,n)}),s("#wppa-pan-div-"+a+" canvas").on("mousemove",function(n){o(a,n)}),s("#wppa-pan-div-"+a+" canvas").on("mouseup",function(n){p(a)}),s("#wppa-pan-div-"+a+" canvas")[0].addEventListener("wheel",function(n){var e;e=a,(n=n).preventDefault(),n.stopPropagation(),c=v(e),v(e,{manCtrl:!1,butDown:!1,autorun:!1,dX:0,dFov:-n.deltaY*c.zoomsensitivity/(wppaIsChrome?60:6)}),w(e),setTimeout(function(){v(e,{dFov:0})},25)}))),c.isLightbox&&(s("body").on("quitimage",function(n){var e;c=v(e=a,{abort:!0,autorun:!1}),clearTimeout(c.timer),s("#wppa-pan-div-"+e+" canvas").hide(),s("#wppa-pctl-div-"+e).hide()}),s("#wppa-pctl-div-"+a).on("click",function(n){wppaKillEvent(n)})),v(a,c),c.isLightbox?(s(window).off("wpparesizeend",wppaOvlShowSame),s(window).on("wpparesizeend",wppaOvlShowSame)):s(window).on("wpparesizeend",function(n){e(a)}),s(document).on("tabbychange",function(n){var e;e=a,c.wppaRenderer.state.reset(),c=v(e,{initialized:!1,abort:!0}),setTimeout(function(){v(e,{abort:!1}),wppaDoSphericPan(e)},200)}),e(a)):setTimeout(function(){wppaDoSphericPan(a)},400))}
js/wppa-spheric.js CHANGED
@@ -2,13 +2,15 @@
2
  //
3
  // contains wppa functions for simple zoomable photos
4
  //
5
- var wppaJsSphericVersion = '7.6.08.004';
6
 
7
  // The main proccedure
8
- function wppaDoSphericPan(mocc) {
9
 
10
  var $ = jQuery;
11
- var data = update(mocc);
 
 
12
 
13
  // Been here before with same parms?
14
  if ( data.initialized ) return;
@@ -112,7 +114,7 @@ function wppaDoSphericPan(mocc) {
112
  data.zoomout.on("touchstart", function(e){zOutDown(mocc,e)});
113
  data.zoomout.on("touchend", function(e){bUp(mocc,e)});
114
 
115
- if ( data.enableManual ) {
116
 
117
  $("#wppa-pan-div-"+mocc+" canvas")[0].addEventListener("touchstart", function(e){onMs(mocc,e)});
118
  $("#wppa-pan-div-"+mocc+" canvas")[0].addEventListener("touchmove", function(e){onMm(mocc,e)});
@@ -136,7 +138,7 @@ function wppaDoSphericPan(mocc) {
136
  data.zoomout.on("mousedown", function(e){zOutDown(mocc,e)});
137
  data.zoomout.on("mouseup", function(e){bUp(mocc,e)});
138
 
139
- if ( data.enableManual ) {
140
 
141
  $("#wppa-pan-div-"+mocc+" canvas").on("mousedown", function(e){onMs(mocc,e)});
142
  $("#wppa-pan-div-"+mocc+" canvas").on("mousemove", function(e){onMm(mocc,e)});
2
  //
3
  // contains wppa functions for simple zoomable photos
4
  //
5
+ var wppaJsSphericVersion = '7.6.08.005';
6
 
7
  // The main proccedure
8
+ function wppaDoSphericPan(mocc, xdata) {
9
 
10
  var $ = jQuery;
11
+ if ( xdata ) wppaSphericData[mocc] = xdata;
12
+ var data = update(mocc, data);
13
+
14
 
15
  // Been here before with same parms?
16
  if ( data.initialized ) return;
114
  data.zoomout.on("touchstart", function(e){zOutDown(mocc,e)});
115
  data.zoomout.on("touchend", function(e){bUp(mocc,e)});
116
 
117
+ if ( data.enableManual && $("#wppa-pan-div-"+mocc+" canvas").length > 0 ) {
118
 
119
  $("#wppa-pan-div-"+mocc+" canvas")[0].addEventListener("touchstart", function(e){onMs(mocc,e)});
120
  $("#wppa-pan-div-"+mocc+" canvas")[0].addEventListener("touchmove", function(e){onMm(mocc,e)});
138
  data.zoomout.on("mousedown", function(e){zOutDown(mocc,e)});
139
  data.zoomout.on("mouseup", function(e){bUp(mocc,e)});
140
 
141
+ if ( data.enableManual && $("#wppa-pan-div-"+mocc+" canvas").length > 0 ) {
142
 
143
  $("#wppa-pan-div-"+mocc+" canvas").on("mousedown", function(e){onMs(mocc,e)});
144
  $("#wppa-pan-div-"+mocc+" canvas").on("mousemove", function(e){onMm(mocc,e)});
js/wppa-spheric.min.js CHANGED
@@ -1 +1 @@
1
- var wppaJsSphericVersion="7.6.08.004";function wppaDoSphericPan(t){var s=jQuery,c=v(t);function w(n){var e=v(n),t=wppaIsElementInViewport(s("#wppa-pan-div-"+n+" canvas"));if(e.manCtrl||!(b()<e.time+25))if(t){if(v(n,{time:b()}),e.isLightbox)(!wppaOvlOpen||wppaOvlActivePanorama!=e.id||wppaGlobalOvlPanoramaId>e.uId)&&(abort=!0);else if(!wppaIsElementInViewport(s("#wppa-pan-div-"+n)))return void setTimeout(function(){w(n)},200);e.abort||((e.butDown||e.manCtrl)&&e.autorun&&(e.autorun=!1,e.dX=0),0==e.dX&&0==e.dY&&0==e.dFov&&(e.pause=!0),e.butDown&&(e.pause=!1),e.fov+=e.dFov,e.fov=Math.max(20,Math.min(120,e.fov)),e.wppaCamera=new THREE.PerspectiveCamera(e.fov,e.aspect,1,1e3),e.wppaCamera.target=new THREE.Vector3(0,0,0),e.lon+=e.dX,e.lat+=e.dY,e.lat=Math.max(-85,Math.min(85,e.lat)),e.wppaCamera.target.x=500*Math.sin(THREE.Math.degToRad(90-e.lat))*Math.cos(THREE.Math.degToRad(e.lon)),e.wppaCamera.target.y=500*Math.cos(THREE.Math.degToRad(90-e.lat)),e.wppaCamera.target.z=500*Math.sin(THREE.Math.degToRad(90-e.lat))*Math.sin(THREE.Math.degToRad(e.lon)),e.wppaCamera.lookAt(e.wppaCamera.target),e.wppaRenderer&&e.wppaRenderer.render(e.wppaScene,e.wppaCamera),wppaAdjustControlbar(),s("#wppa-ovl-spin").hide(),e.manCtrl,(e.autorun||!e.pause&&(e.manCtrl||e.butDown))&&e.wppaRenderer&&(e.timer=setTimeout(function(){w(n)},25)),v(n,e))}else setTimeout(function(){w(n)},200)}function e(n){var e=!wppaIsFs();if(c=v(n)){if(c.isLightbox){if(!wppaOvlOpen)return;s("#wppa-overlay-ic").css("display",""),s("#wppa-overlay-ic").css("width","");var t,a,o=(e=!wppaIsFs())?(a=window.innerWidth||screen.width,window.innerHeight||screen.height):(a=screen.width,screen.height),p=8,i=8+(c.controls?c.icsize+10:0)+30;e&&(p+=2*c.borderWidth,i+=2*c.borderWidth),t=(a-p)/2+i<o,i=e?t?(o-(u=(r=a-p)/2)-i)/2+20:(r=2*(u=o-i),20):(r=screen.width,u=screen.height,0),c.aspect=r/u,s("#wppa-ovl-pan-container").css({top:i}),s("#wppa-overlay-ic").css({top:0}),e?(s("#wppa-ovl-pan-container").css({backgroundColor:c.backgroundColor,padding:c.padding+"px",borderRadius:c.borderRadius+"px",width:r,marginLeft:0}),t?s("#wppa-overlay-ic").css({left:4,marginLeft:0}):s("#wppa-overlay-ic").css({left:(a-r)/2,marginLeft:0})):(s("#wppa-overlay-ic").css({marginLeft:0}),s("#wppa-ovl-pan-container").css({backgroundColor:"transparent",padding:0,borderRadius:"0px",width:r,left:(a-r)/2})),c.wppaRenderer.setSize(r,u)}else{var r=s(c.div).parent().width(),u=parseInt(r/2);c.wppaRenderer.setSize(r,u)}c.width=r,c.height=u,v(n,c),c.timer=setTimeout(function(){w(n)},250)}}function a(n,e){e.preventDefault(),e.stopPropagation(),c=v(n,{manCtrl:!0,butDown:!1,autorun:!1,dX:0}),wppaIsMobile?v(n,{sX:e.touches[0].clientX,sY:e.touches[0].clientY}):v(n,{sX:e.clientX,sY:e.clientY}),v(n,{sLon:c.lon,sLat:c.lat}),w(n)}function o(n,e){e.preventDefault(),e.stopPropagation(),(c=v(n)).manCtrl&&(wppaIsMobile?v(n,{lon:.1*(c.sX-e.touches[0].clientX)+c.sLon,lat:.1*(e.touches[0].clientY-c.sY)+c.sLat,pause:!1}):v(n,{lon:.1*(c.sX-e.clientX)+c.sLon,lat:.1*(e.clientY-c.sY)+c.sLat,pause:!1}),w(n))}function p(n){v(n,{manCtrl:!1})}function i(n){c=v(n),v(n,{dFov:-.4*c.mFakt,butDown:!0}),w(n)}function r(n){c=v(n),v(n,{dFov:.4*c.mFakt,butDown:!0}),w(n)}function u(n){c=v(n),v(n,{dX:.2*c.mFakt,butDown:!0}),w(n)}function l(n){c=v(n),v(n,{dX:-.2*c.mFakt,butDown:!0}),w(n)}function h(n){c=v(n),v(n,{dY:.2*c.mFakt,butDown:!0}),w(n)}function m(n){c=v(n),v(n,{dY:-.2*c.mFakt,butDown:!0}),w(n)}function f(n){c=v(n),v(n,{dX:0,dY:0,dFov:0,butDown:!1})}function v(n,e){if(!wppaSphericData[n])return!1;if(e)for(var t in e)wppaSphericData[n][t]=e[t];return wppaSphericData[n]}function b(){return d=new Date,d.getTime()}c.initialized||c.abort||(c.isLightbox||wppaIsElementInViewport(s("#wppa-pan-div-"+t))?(c.wppaRenderer&&(c.wppaRenderer.state.reset(),c.wppaSphere.dispose(),c.wppaSphereMaterial.dispose(),c.texture.dispose()),c.isLightbox&&wppaOvlOpen&&s("#wppa-ovl-spin").show(),c.manCtrl=!1,c.butDown=!1,c.lon=180,c.lat=0,c.dFov=0,c.abort=!1,c.aspect=2,c.div=s("#wppa-pan-div-"+t),c.left=s("#wppa-pctl-left-"+t),c.right=s("#wppa-pctl-right-"+t),c.up=s("#wppa-pctl-up-"+t),c.down=s("#wppa-pctl-down-"+t),c.zoomin=s("#wppa-pctl-zoomin-"+t),c.zoomout=s("#wppa-pctl-zoomout-"+t),c.prev=s("#wppa-pctl-prev-"+t),c.next=s("#wppa-pctl-next-"+t),c.pause=!1,c.mFakt=wppaIsMobile?"2":"1",c.time=0,c.isLightbox&&(wppaGlobalOvlPanoramaId++,c.uId=wppaGlobalOvlPanoramaId),s(c.div).html(""),c.wppaRenderer=new THREE.WebGLRenderer,c.wppaRenderer.setSize(c.width,c.height),s(c.div).append(c.wppaRenderer.domElement),c.wppaScene=new THREE.Scene,c.wppaSphere=new THREE.SphereGeometry(100,100,40),c.wppaSphere.applyMatrix4((new THREE.Matrix4).makeScale(-1,1,1)),c.texture=(new THREE.TextureLoader).load(c.url),c.wppaSphereMaterial=new THREE.MeshBasicMaterial({map:c.texture}),c.wppaSphereMesh=new THREE.Mesh(c.wppaSphere,c.wppaSphereMaterial),c.wppaScene.add(c.wppaSphereMesh),wppaIsMobile?(c.right.on("touchstart",function(n){u(t)}),c.right.on("touchend",function(n){f(t)}),c.left.on("touchstart",function(n){l(t)}),c.left.on("touchend",function(n){f(t)}),c.up.on("touchstart",function(n){h(t)}),c.up.on("touchend",function(n){f(t)}),c.down.on("touchstart",function(n){m(t)}),c.down.on("touchend",function(n){f(t)}),c.zoomin.on("touchstart",function(n){i(t)}),c.zoomin.on("touchend",function(n){f(t)}),c.zoomout.on("touchstart",function(n){r(t)}),c.zoomout.on("touchend",function(n){f(t)}),c.enableManual&&(s("#wppa-pan-div-"+t+" canvas")[0].addEventListener("touchstart",function(n){a(t,n)}),s("#wppa-pan-div-"+t+" canvas")[0].addEventListener("touchmove",function(n){o(t,n)}),s("#wppa-pan-div-"+t+" canvas")[0].addEventListener("touchend",function(n){p(t)}))):(c.right.on("mousedown",function(n){u(t)}),c.right.on("mouseup",function(n){f(t)}),c.left.on("mousedown",function(n){l(t)}),c.left.on("mouseup",function(n){f(t)}),c.up.on("mousedown",function(n){h(t)}),c.up.on("mouseup",function(n){f(t)}),c.down.on("mousedown",function(n){m(t)}),c.down.on("mouseup",function(n){f(t)}),c.zoomin.off("mousedown"),c.zoomin.on("mousedown",function(n){i(t)}),c.zoomin.off("mouseup"),c.zoomin.on("mouseup",function(n){f(t)}),c.zoomout.on("mousedown",function(n){r(t)}),c.zoomout.on("mouseup",function(n){f(t)}),c.enableManual&&(s("#wppa-pan-div-"+t+" canvas").on("mousedown",function(n){a(t,n)}),s("#wppa-pan-div-"+t+" canvas").on("mousemove",function(n){o(t,n)}),s("#wppa-pan-div-"+t+" canvas").on("mouseup",function(n){p(t)}),s("#wppa-pan-div-"+t+" canvas")[0].addEventListener("wheel",function(n){var e;e=t,(n=n).preventDefault(),n.stopPropagation(),c=v(e),v(e,{manCtrl:!1,butDown:!1,autorun:!1,dX:0,dFov:-n.deltaY*c.zoomsensitivity/(wppaIsChrome?60:6)}),w(e),setTimeout(function(){v(e,{dFov:0})},25)}))),c.isLightbox&&(s("body").on("quitimage",function(n){var e;c=v(e=t,{abort:!0,autorun:!1}),clearTimeout(c.timer),s("#wppa-pan-div-"+e+" canvas").hide(),s("#wppa-pctl-div-"+e).hide()}),s("#wppa-pctl-div-"+t).on("click",function(n){wppaKillEvent(n)})),v(t,c),c.isLightbox?(s(window).off("wpparesizeend",wppaOvlShowSame),s(window).on("wpparesizeend",wppaOvlShowSame)):s(window).on("wpparesizeend",function(n){e(t)}),s(document).on("tabbychange",function(n){var e;e=t,c.wppaRenderer.state.reset(),c=v(e,{initialized:!1,abort:!0}),setTimeout(function(){v(e,{abort:!1}),wppaDoSphericPan(e)},200)}),e(t)):setTimeout(function(){wppaDoSphericPan(t)},400))}
1
+ var wppaJsSphericVersion="7.6.08.005";function wppaDoSphericPan(a,n){var s=jQuery;n&&(wppaSphericData[a]=n);var c=v(a,c);function w(n){var e=v(n),a=wppaIsElementInViewport(s("#wppa-pan-div-"+n+" canvas"));if(e.manCtrl||!(b()<e.time+25))if(a){if(v(n,{time:b()}),e.isLightbox)(!wppaOvlOpen||wppaOvlActivePanorama!=e.id||wppaGlobalOvlPanoramaId>e.uId)&&(abort=!0);else if(!wppaIsElementInViewport(s("#wppa-pan-div-"+n)))return void setTimeout(function(){w(n)},200);e.abort||((e.butDown||e.manCtrl)&&e.autorun&&(e.autorun=!1,e.dX=0),0==e.dX&&0==e.dY&&0==e.dFov&&(e.pause=!0),e.butDown&&(e.pause=!1),e.fov+=e.dFov,e.fov=Math.max(20,Math.min(120,e.fov)),e.wppaCamera=new THREE.PerspectiveCamera(e.fov,e.aspect,1,1e3),e.wppaCamera.target=new THREE.Vector3(0,0,0),e.lon+=e.dX,e.lat+=e.dY,e.lat=Math.max(-85,Math.min(85,e.lat)),e.wppaCamera.target.x=500*Math.sin(THREE.Math.degToRad(90-e.lat))*Math.cos(THREE.Math.degToRad(e.lon)),e.wppaCamera.target.y=500*Math.cos(THREE.Math.degToRad(90-e.lat)),e.wppaCamera.target.z=500*Math.sin(THREE.Math.degToRad(90-e.lat))*Math.sin(THREE.Math.degToRad(e.lon)),e.wppaCamera.lookAt(e.wppaCamera.target),e.wppaRenderer&&e.wppaRenderer.render(e.wppaScene,e.wppaCamera),wppaAdjustControlbar(),s("#wppa-ovl-spin").hide(),e.manCtrl,(e.autorun||!e.pause&&(e.manCtrl||e.butDown))&&e.wppaRenderer&&(e.timer=setTimeout(function(){w(n)},25)),v(n,e))}else setTimeout(function(){w(n)},200)}function e(n){var e=!wppaIsFs();if(c=v(n)){if(c.isLightbox){if(!wppaOvlOpen)return;s("#wppa-overlay-ic").css("display",""),s("#wppa-overlay-ic").css("width","");var a,t,o=(e=!wppaIsFs())?(t=window.innerWidth||screen.width,window.innerHeight||screen.height):(t=screen.width,screen.height),p=8,i=8+(c.controls?c.icsize+10:0)+30;e&&(p+=2*c.borderWidth,i+=2*c.borderWidth),a=(t-p)/2+i<o,i=e?a?(o-(u=(r=t-p)/2)-i)/2+20:(r=2*(u=o-i),20):(r=screen.width,u=screen.height,0),c.aspect=r/u,s("#wppa-ovl-pan-container").css({top:i}),s("#wppa-overlay-ic").css({top:0}),e?(s("#wppa-ovl-pan-container").css({backgroundColor:c.backgroundColor,padding:c.padding+"px",borderRadius:c.borderRadius+"px",width:r,marginLeft:0}),a?s("#wppa-overlay-ic").css({left:4,marginLeft:0}):s("#wppa-overlay-ic").css({left:(t-r)/2,marginLeft:0})):(s("#wppa-overlay-ic").css({marginLeft:0}),s("#wppa-ovl-pan-container").css({backgroundColor:"transparent",padding:0,borderRadius:"0px",width:r,left:(t-r)/2})),c.wppaRenderer.setSize(r,u)}else{var r=s(c.div).parent().width(),u=parseInt(r/2);c.wppaRenderer.setSize(r,u)}c.width=r,c.height=u,v(n,c),c.timer=setTimeout(function(){w(n)},250)}}function t(n,e){e.preventDefault(),e.stopPropagation(),c=v(n,{manCtrl:!0,butDown:!1,autorun:!1,dX:0}),wppaIsMobile?v(n,{sX:e.touches[0].clientX,sY:e.touches[0].clientY}):v(n,{sX:e.clientX,sY:e.clientY}),v(n,{sLon:c.lon,sLat:c.lat}),w(n)}function o(n,e){e.preventDefault(),e.stopPropagation(),(c=v(n)).manCtrl&&(wppaIsMobile?v(n,{lon:.1*(c.sX-e.touches[0].clientX)+c.sLon,lat:.1*(e.touches[0].clientY-c.sY)+c.sLat,pause:!1}):v(n,{lon:.1*(c.sX-e.clientX)+c.sLon,lat:.1*(e.clientY-c.sY)+c.sLat,pause:!1}),w(n))}function p(n){v(n,{manCtrl:!1})}function i(n){c=v(n),v(n,{dFov:-.4*c.mFakt,butDown:!0}),w(n)}function r(n){c=v(n),v(n,{dFov:.4*c.mFakt,butDown:!0}),w(n)}function u(n){c=v(n),v(n,{dX:.2*c.mFakt,butDown:!0}),w(n)}function l(n){c=v(n),v(n,{dX:-.2*c.mFakt,butDown:!0}),w(n)}function h(n){c=v(n),v(n,{dY:.2*c.mFakt,butDown:!0}),w(n)}function m(n){c=v(n),v(n,{dY:-.2*c.mFakt,butDown:!0}),w(n)}function f(n){c=v(n),v(n,{dX:0,dY:0,dFov:0,butDown:!1})}function v(n,e){if(!wppaSphericData[n])return!1;if(e)for(var a in e)wppaSphericData[n][a]=e[a];return wppaSphericData[n]}function b(){return d=new Date,d.getTime()}c.initialized||c.abort||(c.isLightbox||wppaIsElementInViewport(s("#wppa-pan-div-"+a))?(c.wppaRenderer&&(c.wppaRenderer.state.reset(),c.wppaSphere.dispose(),c.wppaSphereMaterial.dispose(),c.texture.dispose()),c.isLightbox&&wppaOvlOpen&&s("#wppa-ovl-spin").show(),c.manCtrl=!1,c.butDown=!1,c.lon=180,c.lat=0,c.dFov=0,c.abort=!1,c.aspect=2,c.div=s("#wppa-pan-div-"+a),c.left=s("#wppa-pctl-left-"+a),c.right=s("#wppa-pctl-right-"+a),c.up=s("#wppa-pctl-up-"+a),c.down=s("#wppa-pctl-down-"+a),c.zoomin=s("#wppa-pctl-zoomin-"+a),c.zoomout=s("#wppa-pctl-zoomout-"+a),c.prev=s("#wppa-pctl-prev-"+a),c.next=s("#wppa-pctl-next-"+a),c.pause=!1,c.mFakt=wppaIsMobile?"2":"1",c.time=0,c.isLightbox&&(wppaGlobalOvlPanoramaId++,c.uId=wppaGlobalOvlPanoramaId),s(c.div).html(""),c.wppaRenderer=new THREE.WebGLRenderer,c.wppaRenderer.setSize(c.width,c.height),s(c.div).append(c.wppaRenderer.domElement),c.wppaScene=new THREE.Scene,c.wppaSphere=new THREE.SphereGeometry(100,100,40),c.wppaSphere.applyMatrix4((new THREE.Matrix4).makeScale(-1,1,1)),c.texture=(new THREE.TextureLoader).load(c.url),c.wppaSphereMaterial=new THREE.MeshBasicMaterial({map:c.texture}),c.wppaSphereMesh=new THREE.Mesh(c.wppaSphere,c.wppaSphereMaterial),c.wppaScene.add(c.wppaSphereMesh),wppaIsMobile?(c.right.on("touchstart",function(n){u(a)}),c.right.on("touchend",function(n){f(a)}),c.left.on("touchstart",function(n){l(a)}),c.left.on("touchend",function(n){f(a)}),c.up.on("touchstart",function(n){h(a)}),c.up.on("touchend",function(n){f(a)}),c.down.on("touchstart",function(n){m(a)}),c.down.on("touchend",function(n){f(a)}),c.zoomin.on("touchstart",function(n){i(a)}),c.zoomin.on("touchend",function(n){f(a)}),c.zoomout.on("touchstart",function(n){r(a)}),c.zoomout.on("touchend",function(n){f(a)}),c.enableManual&&0<s("#wppa-pan-div-"+a+" canvas").length&&(s("#wppa-pan-div-"+a+" canvas")[0].addEventListener("touchstart",function(n){t(a,n)}),s("#wppa-pan-div-"+a+" canvas")[0].addEventListener("touchmove",function(n){o(a,n)}),s("#wppa-pan-div-"+a+" canvas")[0].addEventListener("touchend",function(n){p(a)}))):(c.right.on("mousedown",function(n){u(a)}),c.right.on("mouseup",function(n){f(a)}),c.left.on("mousedown",function(n){l(a)}),c.left.on("mouseup",function(n){f(a)}),c.up.on("mousedown",function(n){h(a)}),c.up.on("mouseup",function(n){f(a)}),c.down.on("mousedown",function(n){m(a)}),c.down.on("mouseup",function(n){f(a)}),c.zoomin.off("mousedown"),c.zoomin.on("mousedown",function(n){i(a)}),c.zoomin.off("mouseup"),c.zoomin.on("mouseup",function(n){f(a)}),c.zoomout.on("mousedown",function(n){r(a)}),c.zoomout.on("mouseup",function(n){f(a)}),c.enableManual&&0<s("#wppa-pan-div-"+a+" canvas").length&&(s("#wppa-pan-div-"+a+" canvas").on("mousedown",function(n){t(a,n)}),s("#wppa-pan-div-"+a+" canvas").on("mousemove",function(n){o(a,n)}),s("#wppa-pan-div-"+a+" canvas").on("mouseup",function(n){p(a)}),s("#wppa-pan-div-"+a+" canvas")[0].addEventListener("wheel",function(n){var e;e=a,(n=n).preventDefault(),n.stopPropagation(),c=v(e),v(e,{manCtrl:!1,butDown:!1,autorun:!1,dX:0,dFov:-n.deltaY*c.zoomsensitivity/(wppaIsChrome?60:6)}),w(e),setTimeout(function(){v(e,{dFov:0})},25)}))),c.isLightbox&&(s("body").on("quitimage",function(n){var e;c=v(e=a,{abort:!0,autorun:!1}),clearTimeout(c.timer),s("#wppa-pan-div-"+e+" canvas").hide(),s("#wppa-pctl-div-"+e).hide()}),s("#wppa-pctl-div-"+a).on("click",function(n){wppaKillEvent(n)})),v(a,c),c.isLightbox?(s(window).off("wpparesizeend",wppaOvlShowSame),s(window).on("wpparesizeend",wppaOvlShowSame)):s(window).on("wpparesizeend",function(n){e(a)}),s(document).on("tabbychange",function(n){var e;e=a,c.wppaRenderer.state.reset(),c=v(e,{initialized:!1,abort:!0}),setTimeout(function(){v(e,{abort:!1}),wppaDoSphericPan(e)},200)}),e(a)):setTimeout(function(){wppaDoSphericPan(a)},400))}
js/wppa-zoom.js CHANGED
@@ -2,12 +2,13 @@
2
  //
3
  // contains wppa functions for simple zoomable photos
4
  //
5
- var wppaJsZoomVersion = '7.6.05.002';
6
 
7
  // The main proccedure
8
- function wppaDoZoomPan(mocc) {
9
 
10
  var $ = jQuery;
 
11
  var data = update(mocc);
12
 
13
  // Been here before with same parms?
@@ -84,18 +85,22 @@ function wppaDoZoomPan(mocc) {
84
  data.zoomin.on("touchend", function(e){buttonUp(mocc, e)});
85
  data.zoomout.on("touchstart", function(e){minDown(mocc, e)});
86
  data.zoomout.on("touchend", function(e){buttonUp(mocc, e)});
87
- data.canvas.addEventListener("touchstart", function(e){canvasDown(mocc, e)});
88
- data.canvas.addEventListener("touchmove", function(e){canvasMove(mocc, e)});
89
- data.canvas.addEventListener("touchend", function(e){canvasUp(mocc,e)});
 
 
90
  }
91
  else {
92
- data.canvas.addEventListener("mousedown", function(e){canvasDown(mocc, e)});
93
- data.canvas.addEventListener("mousemove", function(e){canvasMove(mocc, e)});
94
- data.canvas.addEventListener("mouseup", function(e){canvasUp(mocc, e)});
95
- data.canvas.addEventListener("mouseleave", function(e){canvasLeave(mocc, e)});
96
- data.canvas.addEventListener("mouseenter", function(e){canvasEnter(mocc, e)});
97
-
98
- document.getElementById("wppa-pan-canvas-" + data.itemId ).addEventListener("wheel", function(e){onDivWheel(mocc, e)});
 
 
99
 
100
  data.right.on("mousedown", function(e){rightDown(mocc, e)});
101
  data.right.on("mouseup", function(e){buttonUp(mocc, e)});
2
  //
3
  // contains wppa functions for simple zoomable photos
4
  //
5
+ var wppaJsZoomVersion = '7.6.08.005';
6
 
7
  // The main proccedure
8
+ function wppaDoZoomPan(mocc, xdata) {
9
 
10
  var $ = jQuery;
11
+ if ( xdata ) wppaZoomData[mocc] = xdata;
12
  var data = update(mocc);
13
 
14
  // Been here before with same parms?
85
  data.zoomin.on("touchend", function(e){buttonUp(mocc, e)});
86
  data.zoomout.on("touchstart", function(e){minDown(mocc, e)});
87
  data.zoomout.on("touchend", function(e){buttonUp(mocc, e)});
88
+ if ( data.canvas ) {
89
+ data.canvas.addEventListener("touchstart", function(e){canvasDown(mocc, e)});
90
+ data.canvas.addEventListener("touchmove", function(e){canvasMove(mocc, e)});
91
+ data.canvas.addEventListener("touchend", function(e){canvasUp(mocc,e)});
92
+ }
93
  }
94
  else {
95
+ if ( data.canvas ) {
96
+ data.canvas.addEventListener("mousedown", function(e){canvasDown(mocc, e)});
97
+ data.canvas.addEventListener("mousemove", function(e){canvasMove(mocc, e)});
98
+ data.canvas.addEventListener("mouseup", function(e){canvasUp(mocc, e)});
99
+ data.canvas.addEventListener("mouseleave", function(e){canvasLeave(mocc, e)});
100
+ data.canvas.addEventListener("mouseenter", function(e){canvasEnter(mocc, e)});
101
+
102
+ document.getElementById("wppa-pan-canvas-" + data.itemId ).addEventListener("wheel", function(e){onDivWheel(mocc, e)});
103
+ }
104
 
105
  data.right.on("mousedown", function(e){rightDown(mocc, e)});
106
  data.right.on("mouseup", function(e){buttonUp(mocc, e)});
js/wppa-zoom.min.js CHANGED
@@ -1 +1 @@
1
- var wppaJsZoomVersion="7.6.05.002";function wppaDoZoomPan(o){var m=jQuery,e=l(o);if(!e.initialized&&!e.abort){if(e.isLightbox&&m("#wppa-ovl-spin").show(),!e.image.complete)return wppaConsoleLog("Loading image "+o),void setTimeout(function(){wppaDoZoomPan(o)},200);wppaConsoleLog("Loading image "+o+" complete"),m(image).css({width:image.naturalWidth,height:image.naturalHeight,maxWidth:image.naturalWidth,maxHeight:image.naturalHeight}),e.manual=!1,e.deltaX=0,e.deltaY=0,e.deltaFactor=1,e.busy=!1,e.div=m("#wppa-pan-div-"+e.itemId),e.canvas=document.getElementById("wppa-pan-canvas-"+e.itemId),e.left=m("#wppa-pctl-left-"+e.itemId),e.right=m("#wppa-pctl-right-"+e.itemId),e.up=m("#wppa-pctl-up-"+e.itemId),e.down=m("#wppa-pctl-down-"+e.itemId),e.zoomin=m("#wppa-pctl-zoomin-"+e.itemId),e.zoomout=m("#wppa-pctl-zoomout-"+e.itemId),e.prev=m("#wppa-pctl-prev-"+e.itemId),e.next=m("#wppa-pctl-next-"+e.itemId),e.exit=m("#wppa-exit-btn-2"),e.canvasWidth=e.width,e.canvasHeight=e.height,e.savedCanvasX=0,e.savedCanvasY=0,e.fromHeight=e.image.height,e.fromWidth=e.image.width,e.imageRatio=e.image.width/e.image.height,e.fromX=0,e.fromY=0,e.centerX=e.fromX+e.fromWidth/2,e.centerY=e.fromY+e.fromHeight/2,e.ctx=null,e.buttondown=!1,e.enableManual=!0,e.ctrlbarUpdate=!0,e.pause=!1,e.time=0,wppaIsMobile?(e.right.on("touchstart",function(a){n(o)}),e.right.on("touchend",function(a){p(o)}),e.left.on("touchstart",function(a){i(o)}),e.left.on("touchend",function(a){p(o)}),e.up.on("touchstart",function(a){s(o)}),e.up.on("touchend",function(a){p(o)}),e.down.on("touchstart",function(a){r(o)}),e.down.on("touchend",function(a){p(o)}),e.zoomin.on("touchstart",function(a){c(o)}),e.zoomin.on("touchend",function(a){p(o)}),e.zoomout.on("touchstart",function(a){u(o)}),e.zoomout.on("touchend",function(a){p(o)}),e.canvas.addEventListener("touchstart",function(a){f(o,a)}),e.canvas.addEventListener("touchmove",function(a){g(o,a)}),e.canvas.addEventListener("touchend",function(a){w(o)})):(e.canvas.addEventListener("mousedown",function(a){f(o,a)}),e.canvas.addEventListener("mousemove",function(a){g(o,a)}),e.canvas.addEventListener("mouseup",function(a){w(o)}),e.canvas.addEventListener("mouseleave",function(a){(e=l(o)).manual&&l(o,{pause:!0})}),e.canvas.addEventListener("mouseenter",function(a){var t;l(t=o,{pause:!1}).manual&&h(t)}),document.getElementById("wppa-pan-canvas-"+e.itemId).addEventListener("wheel",function(a){var t,n;t=o,(n=a).preventDefault(),n.stopPropagation(),e=l(t),l(t,{deltaFactor:1+n.deltaY*e.zoomsensitivity/(wppaIsChrome?1e4:1e3),manual:!1,burrondown:!1}),h(t),setTimeout(function(){l(t,{deltaFactor:1})},25)}),e.right.on("mousedown",function(a){n(o)}),e.right.on("mouseup",function(a){p(o)}),e.left.on("mousedown",function(a){i(o)}),e.left.on("mouseup",function(a){p(o)}),e.up.on("mousedown",function(a){s(o)}),e.up.on("mouseup",function(a){p(o)}),e.down.on("mousedown",function(a){r(o)}),e.down.on("mouseup",function(a){p(o)}),e.zoomin.off("mousedown"),e.zoomin.on("mousedown",function(a){c(o)}),e.zoomin.off("mouseup"),e.zoomin.on("mouseup",function(a){p(o)}),e.zoomout.on("mousedown",function(a){u(o)}),e.zoomout.on("mouseup",function(a){p(o)})),e.isLightbox&&(m("body").on("quitimage",function(a){var t;t=o,wppaConsoleLog("Zoom Quit Image"),e=l(t,{abort:!0}),m(e.canvas).hide(),m("#wppa-pctl-div-"+e.itemId).hide()}),m("#wppa-pctl-div-"+e.itemId).on("click",function(a){wppaKillEvent(a)})),e.isLightbox?(m(window).off("resize",wppaOvlShowSame),m(window).on("resize",wppaOvlShowSame)):m(window).on("resize",function(a){t(o)}),t(o),e.initialized=!0,l(o,e),m("#wppa-ovl-spin").hide()}function h(a){var t,n,o,e,i,s=l(a);s.canvas&&(L()<s.time+10?wppaConsoleLog("Skipped render "+a):(l(a,{time:L()}),wppaConsoleLog("Zoom render "+a),(s.isLightbox&&!wppaOvlOpen||!s.isLightbox&&wppaOvlOpen)&&(s=l(0,{abort:!0})),s.abort?l(a,{manual:!1,buttondown:!1,pause:!1,ctx:null}):s.busy||(wppaDebugCounter++,(s=l(a,{busy:!0})).manual||(s.fromX+=s.deltaX,s.fromY+=s.deltaY,t=s.fromHeight/s.deltaFactor,n=s.fromWidth/s.deltaFactor,50<t&&1!=s.deltaFactor&&(wppaIsFs()||t<=s.image.height)&&(s.fromX-=(n-s.fromWidth)/2,s.fromY-=(t-s.fromHeight)/2,s.fromWidth=n,s.fromHeight=t)),s.fromX=Math.max(0,Math.min(s.image.width-s.fromWidth,s.fromX)),s.fromY=Math.max(0,Math.min(s.image.height-s.fromHeight,s.fromY)),o=screen.width/screen.height,e=(1-s.image.width/s.fromWidth)*s.canvas.width/2,i=(1-s.image.height/s.fromHeight)*s.canvas.height/2,s.ctx=s.canvas.getContext("2d"),o>s.imageRatio&&t>s.image.height&&wppaIsFs()||o<=s.imageRatio&&n>s.image.width&&wppaIsFs()?(s.enableManual=!1,s.ctx.clearRect(0,0,s.canvas.width,s.canvas.height),s.ctx.drawImage(s.image,s.fromX,s.fromY,s.fromWidth,s.fromHeight,e,i,s.canvas.width,s.canvas.height),jQuery(s.canvas).css({cursor:"default"})):(s.enableManual=!0,s.ctx.drawImage(s.image,s.fromX,s.fromY,s.fromWidth,s.fromHeight,0,0,s.canvas.width,s.canvas.height),jQuery(s.canvas).css({cursor:"grab"})),wppaIsFs()?(s.fsMaskTop=i-(s.canvas.height-screen.height)/2,s.fsMaskLeft=e-(s.canvas.width-screen.width)/2,s.fsMaskBottom=screen.height-s.fsMaskTop,s.fsMaskRight=screen.width-s.fsMaskLeft):(s.fsMaskTop=0,s.fsMaskLeft=0,s.fsMaskBottom=0,s.fsMaskRight=0),s.ctrlbarUpdate&&(wppaAdjustControlbar(),s.ctrlbarUpdate=!1),s.busy=!1,l(a,s),s.pause||!s.manual&&!s.buttondown||setTimeout(function(){h(a)},10),s.pause&&l(a,{pause:!1}))))}function t(a){var t,n,o,e,i,s,r,c,d,u=l(a);u&&(u.isLightbox?(m("#wppa-overlay-ic").css("display",""),e=(n=!wppaIsFs())?(o=window.innerWidth?window.innerWidth:screen.width,window.innerHeight?window.innerHeight:screen.height):(o=screen.width,screen.height),r=0,d=(c=8)+(u.controls?u.icsize+10:0)+10,n?(c+=2*u.borderWidth,d+=2*u.borderWidth):c=40,t=n?e-d>(o-c)/u.imageRatio:(screenRatio=screen.width/screen.height,screenRatio<u.imageRatio),n&&t&&(r=(e-(s=(i=o-c)/u.imageRatio)-d)/2+20),n&&!t&&(s=(i=u.imageRatio*(e-(u.controls?u.icsize:0)-48))/u.imageRatio,r=20),!n&&t&&(i=(s=screen.height)*u.imageRatio,r=0),n||t||(s=(i=screen.width)/u.imageRatio,r=(screen.height-s)/2),m("#wppa-ovl-pan-container").css({marginTop:r}),m("#wppa-overlay-ic").css({marginTop:0,marginLeft:0}),u.canvasWidth=i,u.canvasHeight=s,u.canvas.width=u.canvasWidth,u.canvas.height=u.canvasHeight,n?(m("#wppa-ovl-pan-container").css({backgroundColor:u.backgroundColor,padding:u.padding,borderRadius:u.borderRadius+"px",borderWidth:u.borderWidth+"px",width:i,marginLeft:0}),t?m("#wppa-overlay-ic").css({left:4}):m("#wppa-overlay-ic").css({left:(o-i)/2})):(m("#wppa-overlay-ic").css({marginLeft:0}),m("#wppa-ovl-pan-container").css({backgroundColor:"transparent",padding:0,borderRadius:"0px",borderWidth:"0px",width:i,left:(o-i)/2,position:"fixed"}))):(u.canvasWidth=m(u.div).parent().width(),u.canvasHeight=u.canvasWidth/u.imageRatio,u.canvas.width=u.canvasWidth,u.canvas.height=u.canvasHeight),u.ctrlbarUpdate=!0,l(a,u),setTimeout(function(){h(a)},250))}function n(a){var t=l(a),n=t.image.naturalWidth/t.canvas.width;n<1.5&&(n=1.5),l(a,{deltaX:n*=1.5,buttondown:!0,manual:!1}),h(a)}function i(a){var t=l(a),n=t.image.naturalWidth/t.canvas.width;n<1.5&&(n=1.5),l(a,{deltaX:-(n*=1.5),buttondown:!0,manual:!1}),h(a)}function s(a){var t=l(a),n=t.image.naturalHeight/t.canvas.height;n<1.5&&(n=1.5),l(a,{deltaY:-(n*=1.5),buttondown:!0,manual:!1}),h(a)}function r(a){var t=l(a),n=t.image.naturalHeight/t.canvas.height;n<1.5&&(n=1.5),l(a,{deltaY:n*=1.5,buttondown:!0,manual:!1}),h(a)}function c(a){l(a,{deltaFactor:1.005,buttondown:!0,manual:!1}),h(a)}function u(a){l(a,{deltaFactor:.995,buttondown:!0,manual:!1}),h(a)}function p(a){l(a,{deltaX:0,deltaY:0,deltaFactor:1,buttondown:!1})}function f(a,t){var n=l(a),o=v(t).X,e=v(t).Y;if(wppaIsFs()&&n.isLightbox&&(o<n.fsMaskLeft||o>n.fsMaskRight||e<n.fsMaskTop||e>n.fsMaskBottom))return l(0,{abort:!0}),void jQuery("#wppa-overlay-bg").trigger("click");n.enableManual&&(l(a,{manual:!0,savedCanvasX:o=b(a,t).X,savedCanvasY:e=b(a,t).Y,buttondown:!1}),h(a))}function g(a,t){var n,o,e,i=l(a),s=b(a,t).X,r=b(a,t).Y;i.manual&&(n=i.canvas.width/i.fromWidth,o=(i.savedCanvasX-s)/n+i.fromX,e=(i.savedCanvasY-r)/n+i.fromY,0<o&&0<e&&o+i.fromWidth<i.image.width&&e+i.fromHeight<i.image.height&&l(a,{fromX:o,fromY:e,savedCanvasX:s,savedCanvasY:r}))}function w(a){l(a,{manual:!1})}function l(a,t){if(!wppaZoomData[a])return!1;if(t)for(var n in t)wppaZoomData[a][n]=t[n];return wppaZoomData[a]}function v(a){var t,n;return n=wppaIsMobile?(t=a.touches[0].screenX,a.touches[0].screenY):(t=a.screenX,a.screenY),{X:t,Y:n}}function b(a,t){var n,o,e;return e=wppaIsMobile?(n=l(a),o=t.touches[0].screenX-n.fsMaskLeft,t.touches[0].screenY-n.fsMaskTop):(o=t.offsetX,t.offsetY),{X:o,Y:e}}function L(){return d=new Date,d.getTime()}}
1
+ var wppaJsZoomVersion="7.6.08.005";function wppaDoZoomPan(n,a){var m=jQuery;a&&(wppaZoomData[n]=a);var o=l(n);if(!o.initialized&&!o.abort){if(o.isLightbox&&m("#wppa-ovl-spin").show(),!o.image.complete)return wppaConsoleLog("Loading image "+n),void setTimeout(function(){wppaDoZoomPan(n)},200);wppaConsoleLog("Loading image "+n+" complete"),m(image).css({width:image.naturalWidth,height:image.naturalHeight,maxWidth:image.naturalWidth,maxHeight:image.naturalHeight}),o.manual=!1,o.deltaX=0,o.deltaY=0,o.deltaFactor=1,o.busy=!1,o.div=m("#wppa-pan-div-"+o.itemId),o.canvas=document.getElementById("wppa-pan-canvas-"+o.itemId),o.left=m("#wppa-pctl-left-"+o.itemId),o.right=m("#wppa-pctl-right-"+o.itemId),o.up=m("#wppa-pctl-up-"+o.itemId),o.down=m("#wppa-pctl-down-"+o.itemId),o.zoomin=m("#wppa-pctl-zoomin-"+o.itemId),o.zoomout=m("#wppa-pctl-zoomout-"+o.itemId),o.prev=m("#wppa-pctl-prev-"+o.itemId),o.next=m("#wppa-pctl-next-"+o.itemId),o.exit=m("#wppa-exit-btn-2"),o.canvasWidth=o.width,o.canvasHeight=o.height,o.savedCanvasX=0,o.savedCanvasY=0,o.fromHeight=o.image.height,o.fromWidth=o.image.width,o.imageRatio=o.image.width/o.image.height,o.fromX=0,o.fromY=0,o.centerX=o.fromX+o.fromWidth/2,o.centerY=o.fromY+o.fromHeight/2,o.ctx=null,o.buttondown=!1,o.enableManual=!0,o.ctrlbarUpdate=!0,o.pause=!1,o.time=0,wppaIsMobile?(o.right.on("touchstart",function(a){e(n)}),o.right.on("touchend",function(a){h(n)}),o.left.on("touchstart",function(a){i(n)}),o.left.on("touchend",function(a){h(n)}),o.up.on("touchstart",function(a){s(n)}),o.up.on("touchend",function(a){h(n)}),o.down.on("touchstart",function(a){r(n)}),o.down.on("touchend",function(a){h(n)}),o.zoomin.on("touchstart",function(a){c(n)}),o.zoomin.on("touchend",function(a){h(n)}),o.zoomout.on("touchstart",function(a){u(n)}),o.zoomout.on("touchend",function(a){h(n)}),o.canvas&&(o.canvas.addEventListener("touchstart",function(a){f(n,a)}),o.canvas.addEventListener("touchmove",function(a){g(n,a)}),o.canvas.addEventListener("touchend",function(a){w(n)}))):(o.canvas&&(o.canvas.addEventListener("mousedown",function(a){f(n,a)}),o.canvas.addEventListener("mousemove",function(a){g(n,a)}),o.canvas.addEventListener("mouseup",function(a){w(n)}),o.canvas.addEventListener("mouseleave",function(a){(o=l(n)).manual&&l(n,{pause:!0})}),o.canvas.addEventListener("mouseenter",function(a){var t;l(t=n,{pause:!1}).manual&&p(t)}),document.getElementById("wppa-pan-canvas-"+o.itemId).addEventListener("wheel",function(a){var t;t=n,(a=a).preventDefault(),a.stopPropagation(),o=l(t),l(t,{deltaFactor:1+a.deltaY*o.zoomsensitivity/(wppaIsChrome?1e4:1e3),manual:!1,burrondown:!1}),p(t),setTimeout(function(){l(t,{deltaFactor:1})},25)})),o.right.on("mousedown",function(a){e(n)}),o.right.on("mouseup",function(a){h(n)}),o.left.on("mousedown",function(a){i(n)}),o.left.on("mouseup",function(a){h(n)}),o.up.on("mousedown",function(a){s(n)}),o.up.on("mouseup",function(a){h(n)}),o.down.on("mousedown",function(a){r(n)}),o.down.on("mouseup",function(a){h(n)}),o.zoomin.off("mousedown"),o.zoomin.on("mousedown",function(a){c(n)}),o.zoomin.off("mouseup"),o.zoomin.on("mouseup",function(a){h(n)}),o.zoomout.on("mousedown",function(a){u(n)}),o.zoomout.on("mouseup",function(a){h(n)})),o.isLightbox&&(m("body").on("quitimage",function(a){var t;t=n,wppaConsoleLog("Zoom Quit Image"),o=l(t,{abort:!0}),m(o.canvas).hide(),m("#wppa-pctl-div-"+o.itemId).hide()}),m("#wppa-pctl-div-"+o.itemId).on("click",function(a){wppaKillEvent(a)})),o.isLightbox?(m(window).off("resize",wppaOvlShowSame),m(window).on("resize",wppaOvlShowSame)):m(window).on("resize",function(a){t(n)}),t(n),o.initialized=!0,l(n,o),m("#wppa-ovl-spin").hide()}function p(a){var t,n,o,e,i,s=l(a);s.canvas&&(L()<s.time+10?wppaConsoleLog("Skipped render "+a):(l(a,{time:L()}),wppaConsoleLog("Zoom render "+a),(s.isLightbox&&!wppaOvlOpen||!s.isLightbox&&wppaOvlOpen)&&(s=l(0,{abort:!0})),s.abort?l(a,{manual:!1,buttondown:!1,pause:!1,ctx:null}):s.busy||(wppaDebugCounter++,(s=l(a,{busy:!0})).manual||(s.fromX+=s.deltaX,s.fromY+=s.deltaY,t=s.fromHeight/s.deltaFactor,n=s.fromWidth/s.deltaFactor,50<t&&1!=s.deltaFactor&&(wppaIsFs()||t<=s.image.height)&&(s.fromX-=(n-s.fromWidth)/2,s.fromY-=(t-s.fromHeight)/2,s.fromWidth=n,s.fromHeight=t)),s.fromX=Math.max(0,Math.min(s.image.width-s.fromWidth,s.fromX)),s.fromY=Math.max(0,Math.min(s.image.height-s.fromHeight,s.fromY)),o=screen.width/screen.height,e=(1-s.image.width/s.fromWidth)*s.canvas.width/2,i=(1-s.image.height/s.fromHeight)*s.canvas.height/2,s.ctx=s.canvas.getContext("2d"),o>s.imageRatio&&t>s.image.height&&wppaIsFs()||o<=s.imageRatio&&n>s.image.width&&wppaIsFs()?(s.enableManual=!1,s.ctx.clearRect(0,0,s.canvas.width,s.canvas.height),s.ctx.drawImage(s.image,s.fromX,s.fromY,s.fromWidth,s.fromHeight,e,i,s.canvas.width,s.canvas.height),jQuery(s.canvas).css({cursor:"default"})):(s.enableManual=!0,s.ctx.drawImage(s.image,s.fromX,s.fromY,s.fromWidth,s.fromHeight,0,0,s.canvas.width,s.canvas.height),jQuery(s.canvas).css({cursor:"grab"})),wppaIsFs()?(s.fsMaskTop=i-(s.canvas.height-screen.height)/2,s.fsMaskLeft=e-(s.canvas.width-screen.width)/2,s.fsMaskBottom=screen.height-s.fsMaskTop,s.fsMaskRight=screen.width-s.fsMaskLeft):(s.fsMaskTop=0,s.fsMaskLeft=0,s.fsMaskBottom=0,s.fsMaskRight=0),s.ctrlbarUpdate&&(wppaAdjustControlbar(),s.ctrlbarUpdate=!1),s.busy=!1,l(a,s),s.pause||!s.manual&&!s.buttondown||setTimeout(function(){p(a)},10),s.pause&&l(a,{pause:!1}))))}function t(a){var t,n,o,e,i,s,r,c,d,u=l(a);u&&(u.isLightbox?(m("#wppa-overlay-ic").css("display",""),e=(n=!wppaIsFs())?(o=window.innerWidth||screen.width,window.innerHeight||screen.height):(o=screen.width,screen.height),r=0,d=(c=8)+(u.controls?u.icsize+10:0)+10,n?(c+=2*u.borderWidth,d+=2*u.borderWidth):c=40,t=n?e-d>(o-c)/u.imageRatio:(screenRatio=screen.width/screen.height,screenRatio<u.imageRatio),n&&t&&(r=(e-(s=(i=o-c)/u.imageRatio)-d)/2+20),n&&!t&&(s=(i=u.imageRatio*(e-(u.controls?u.icsize:0)-48))/u.imageRatio,r=20),!n&&t&&(i=(s=screen.height)*u.imageRatio,r=0),n||t||(s=(i=screen.width)/u.imageRatio,r=(screen.height-s)/2),m("#wppa-ovl-pan-container").css({marginTop:r}),m("#wppa-overlay-ic").css({marginTop:0,marginLeft:0}),u.canvasWidth=i,u.canvasHeight=s,u.canvas.width=u.canvasWidth,u.canvas.height=u.canvasHeight,n?(m("#wppa-ovl-pan-container").css({backgroundColor:u.backgroundColor,padding:u.padding,borderRadius:u.borderRadius+"px",borderWidth:u.borderWidth+"px",width:i,marginLeft:0}),t?m("#wppa-overlay-ic").css({left:4}):m("#wppa-overlay-ic").css({left:(o-i)/2})):(m("#wppa-overlay-ic").css({marginLeft:0}),m("#wppa-ovl-pan-container").css({backgroundColor:"transparent",padding:0,borderRadius:"0px",borderWidth:"0px",width:i,left:(o-i)/2,position:"fixed"}))):(u.canvasWidth=m(u.div).parent().width(),u.canvasHeight=u.canvasWidth/u.imageRatio,u.canvas.width=u.canvasWidth,u.canvas.height=u.canvasHeight),u.ctrlbarUpdate=!0,l(a,u),setTimeout(function(){p(a)},250))}function e(a){var t=l(a),t=t.image.naturalWidth/t.canvas.width;t<1.5&&(t=1.5),l(a,{deltaX:t*=1.5,buttondown:!0,manual:!1}),p(a)}function i(a){var t=l(a),t=t.image.naturalWidth/t.canvas.width;t<1.5&&(t=1.5),l(a,{deltaX:-(t*=1.5),buttondown:!0,manual:!1}),p(a)}function s(a){var t=l(a),t=t.image.naturalHeight/t.canvas.height;t<1.5&&(t=1.5),l(a,{deltaY:-(t*=1.5),buttondown:!0,manual:!1}),p(a)}function r(a){var t=l(a),t=t.image.naturalHeight/t.canvas.height;t<1.5&&(t=1.5),l(a,{deltaY:t*=1.5,buttondown:!0,manual:!1}),p(a)}function c(a){l(a,{deltaFactor:1.005,buttondown:!0,manual:!1}),p(a)}function u(a){l(a,{deltaFactor:.995,buttondown:!0,manual:!1}),p(a)}function h(a){l(a,{deltaX:0,deltaY:0,deltaFactor:1,buttondown:!1})}function f(a,t){var n=l(a),o=v(t).X,e=v(t).Y;if(wppaIsFs()&&n.isLightbox&&(o<n.fsMaskLeft||o>n.fsMaskRight||e<n.fsMaskTop||e>n.fsMaskBottom))return l(0,{abort:!0}),void jQuery("#wppa-overlay-bg").trigger("click");n.enableManual&&(l(a,{manual:!0,savedCanvasX:o=b(a,t).X,savedCanvasY:e=b(a,t).Y,buttondown:!1}),p(a))}function g(a,t){var n,o=l(a),e=b(a,t).X,i=b(a,t).Y;o.manual&&(n=o.canvas.width/o.fromWidth,t=(o.savedCanvasX-e)/n+o.fromX,n=(o.savedCanvasY-i)/n+o.fromY,0<t&&0<n&&t+o.fromWidth<o.image.width&&n+o.fromHeight<o.image.height&&l(a,{fromX:t,fromY:n,savedCanvasX:e,savedCanvasY:i}))}function w(a){l(a,{manual:!1})}function l(a,t){if(!wppaZoomData[a])return!1;if(t)for(var n in t)wppaZoomData[a][n]=t[n];return wppaZoomData[a]}function v(a){var t;return a=wppaIsMobile?(t=a.touches[0].screenX,a.touches[0].screenY):(t=a.screenX,a.screenY),{X:t,Y:a}}function b(a,t){var n;return t=wppaIsMobile?(a=l(a),n=t.touches[0].screenX-a.fsMaskLeft,t.touches[0].screenY-a.fsMaskTop):(n=t.offsetX,t.offsetY),{X:n,Y:t}}function L(){return d=new Date,d.getTime()}}
wppa-picture.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Make the picture html
6
- * Version 7.6.08.002
7
  *
8
  */
9
 
@@ -625,7 +625,7 @@ function wppa_get_spheric_pan_html( $args ) {
625
  ) .
626
  'image.src = "' . $url . '";' .
627
  */
628
- 'var data =
629
  { mocc :' . $mocc . ',
630
  id :' . $id . ',
631
  uId :0,
@@ -648,11 +648,12 @@ function wppa_get_spheric_pan_html( $args ) {
648
  borderRadius :' . wppa_opt( 'ovl_border_radius' ) . ',
649
  padding :' . wppa_opt( 'ovl_border_width' ) . ',
650
  enableManual :' . $manual . ',
651
- };
652
- wppaSphericData[' . $mocc . '] = data;' .
 
653
 
654
  // When document complete, run the main proc
655
- 'jQuery(document).ready(function(){wppaDoSphericPan(' . $mocc . ')});' .
656
 
657
  '</script>' .
658
  ( $haslink ? '<a>' : '' ) . '';
@@ -1701,7 +1702,7 @@ function wppa_get_zoom_pan_html( $args ) {
1701
  ) .
1702
  'image.src = "' . $url . '";' .
1703
 
1704
- 'var data =
1705
  { mocc :' . $mocc . ',
1706
  id :' . $id . ',
1707
  itemId :"' . $itemid . '",
@@ -1718,11 +1719,11 @@ function wppa_get_zoom_pan_html( $args ) {
1718
  backgroundColor :\'' . wppa_opt( 'ovl_theme' ) . '\',
1719
  borderRadius :' . wppa_opt( 'ovl_border_radius' ) . ',
1720
  padding :' . wppa_opt( 'ovl_border_width' ) . '
1721
- };
1722
- wppaZoomData[' . $mocc . '] = data;' .
1723
 
1724
  // When document complete, run the main proc
1725
- 'jQuery(document).ready(function(){wppaDoZoomPan(' . $mocc . ');});' .
1726
 
1727
  '</script>
1728
  ' . ( $haslink ? '<a>' : '' ) . '';
3
  * Package: wp-photo-album-plus
4
  *
5
  * Make the picture html
6
+ * Version 7.6.08.005
7
  *
8
  */
9
 
625
  ) .
626
  'image.src = "' . $url . '";' .
627
  */
628
+ 'var data' . $mocc . ' =
629
  { mocc :' . $mocc . ',
630
  id :' . $id . ',
631
  uId :0,
648
  borderRadius :' . wppa_opt( 'ovl_border_radius' ) . ',
649
  padding :' . wppa_opt( 'ovl_border_width' ) . ',
650
  enableManual :' . $manual . ',
651
+ };' .
652
+
653
+ // 'wppaSphericData[' . $mocc . '] = data;' .
654
 
655
  // When document complete, run the main proc
656
+ 'jQuery(document).ready(function(){wppaDoSphericPan(' . $mocc . ', data' . $mocc . ')});' .
657
 
658
  '</script>' .
659
  ( $haslink ? '<a>' : '' ) . '';
1702
  ) .
1703
  'image.src = "' . $url . '";' .
1704
 
1705
+ 'var data' . $mocc . ' =
1706
  { mocc :' . $mocc . ',
1707
  id :' . $id . ',
1708
  itemId :"' . $itemid . '",
1719
  backgroundColor :\'' . wppa_opt( 'ovl_theme' ) . '\',
1720
  borderRadius :' . wppa_opt( 'ovl_border_radius' ) . ',
1721
  padding :' . wppa_opt( 'ovl_border_width' ) . '
1722
+ };' .
1723
+ // 'wppaZoomData[' . $mocc . '] = data;' .
1724
 
1725
  // When document complete, run the main proc
1726
+ 'jQuery(document).ready(function(){wppaDoZoomPan(' . $mocc . ', data' . $mocc . ');});' .
1727
 
1728
  '</script>
1729
  ' . ( $haslink ? '<a>' : '' ) . '';
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.6.08.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,7 +24,7 @@ global $wp_version;
24
 
25
  /* WPPA GLOBALS */
26
  global $wppa_revno; $wppa_revno = '7607'; // WPPA db version
27
- global $wppa_api_version; $wppa_api_version = '7.6.08.004'; // 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.6.08.005
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 = '7607'; // WPPA db version
27
+ global $wppa_api_version; $wppa_api_version = '7.6.08.005'; // WPPA software version
28
 
29
  /* Init page js data */
30
  global $wppa_js_page_data; $wppa_js_page_data = '';