diff --git a/turn.js b/turn.js index e8fcec6..9bce409 100644 --- a/turn.js +++ b/turn.js @@ -21,8 +21,8 @@ var has3d, isTouch = 'Touch' in window, - events = (isTouch) ? {start: 'touchstart', move: 'touchmove', end: 'touchend'} - : {start: 'mousedown', move: 'mousemove', end: 'mouseup'}, + events = (isTouch) ? {start: 'touchstart', move: 'touchmove', end: 'touchend'} + : {start: 'mousedown', move: 'mousemove', end: 'mouseup'}, // Contansts used for each corner // tl * tr @@ -1512,14 +1512,18 @@ flipMethods = { gradient(data.ashadow, point2D(left?100:0, top?100:0), point2D(gradientEndPointA.x, gradientEndPointA.y), - [[gradientStartV, 'rgba(0,0,0,0)'], [((1-gradientStartV)*0.8)+gradientStartV, 'rgba(0,0,0,'+(0.2*gradientOpacity)+')'], [1, 'rgba(255,255,255,'+(0.2*gradientOpacity)+')']], + [[gradientStartV, 'rgba(0,0,0,0)'], + [((1-gradientStartV)*0.8)+gradientStartV, 'rgba(0,0,0,'+(0.2*gradientOpacity)+')'], + [1, 'rgba(255,255,255,'+(0.2*gradientOpacity)+')']], 3); if (flipMethods._backGradient.call(that)) gradient(data.bshadow, point2D(left?0:100, top?0:100), point2D(gradientEndPointB.x, gradientEndPointB.y), - [[0.8, 'rgba(0,0,0,0)'], [1, 'rgba(0,0,0,'+(0.3*gradientOpacity)+')'], [1, 'rgba(0,0,0,0)']], + [[0.8, 'rgba(0,0,0,0)'], + [1, 'rgba(0,0,0,'+(0.3*gradientOpacity)+')'], + [1, 'rgba(0,0,0,0)']], 3); }; diff --git a/turn.min.js b/turn.min.js index e863aa6..4c9bcda 100644 --- a/turn.min.js +++ b/turn.min.js @@ -1,4 +1,4 @@ -/* turn.js | turnjs.com | (c) 2012 Emmanuel Garcia | MIT Licensed */ +/* turn.js r3 | turnjs.com | (c) 2012 Emmanuel Garcia | MIT Licensed */ (function(i){var x,y="",G=Math.PI,E=G/2,w="Touch"in window,I=w?{start:"touchstart",move:"touchmove",end:"touchend"}:{start:"mousedown",move:"mousemove",end:"mouseup"},N={backward:["bl","tl"],forward:["br","tr"],all:["tl","bl","tr","br"]},O=["single","double"],P={page:1,gradients:!0,duration:600,acceleration:!0,display:"double",when:null},Q={folding:null,corners:"forward",cornerSize:100,gradients:!0,duration:600,acceleration:!0},J={"0":{top:0,left:0,right:"auto",bottom:"auto"},1:{top:0,right:0,left:"auto", bottom:"auto"}},m=function(a,b,c,d){return{css:{position:"absolute",top:a,left:b,overflow:d||"hidden","z-index":c||"auto"}}},K=function(a,b,c,d,e){var f=1-e,C=f*f*f,h=e*e*e;return j(Math.round(C*a.x+3*e*f*f*b.x+3*e*e*f*c.x+h*d.x),Math.round(C*a.y+3*e*f*f*b.y+3*e*e*f*c.y+h*d.y))},j=function(a,b){return{x:a,y:b}},r=function(a,b,c){return x&&c?" translate3d("+a+"px,"+b+"px, 0px) ":" translate("+a+"px, "+b+"px) "},s=function(a){return" rotate("+a+"deg) "},p=function(a,b){return Object.prototype.hasOwnProperty.call(b, a)},R=function(){for(var a=["Moz","Webkit","Khtml","O","ms"],b=document.body.style,c=a.length,d="";c--;)a[c]+"Transform"in b&&(d="-"+a[c].toLowerCase()+"-");return d},L=function(a,b,c,d,e){var f,C=[];if("-webkit-"==y){for(f=0;f