diff --git a/bower.json b/bower.json index 144da44..0271ee9 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "flip", - "version": "1.1.1", + "version": "1.1.2", "license": "MIT", "dependencies": { "jquery": "~2.0" diff --git a/dist/jquery.flip.js b/dist/jquery.flip.js index baefc65..bc5d328 100644 --- a/dist/jquery.flip.js +++ b/dist/jquery.flip.js @@ -1,4 +1,4 @@ -/*! flip - v1.1.1 - 2016-05-25 +/*! flip - v1.1.2 - 2016-10-20 * https://github.com/nnattawat/flip * Copyright (c) 2016 Nattawat Nonsung; Licensed MIT */ (function( $ ) { @@ -172,7 +172,8 @@ }; var backElementCss = { "transform": rotateAxis + "(" + (self.setting.reverse ? "180deg" : "-180deg") + ")", - "z-index": "0" + "z-index": "0", + "position": "relative" }; var faceElementCss = { "backface-visibility": "hidden", @@ -199,12 +200,14 @@ elementCss["-webkit-transform-style"] = "preserve-3d"; } - self.element.css(elementCss); - self.backElement.css(backElementCss); + faces.css(faceElementCss).find('*').css({ "backface-visibility": "hidden" }); + self.element.css(elementCss); + self.backElement.css(backElementCss); + // #39 // not forcing width/height may cause an initial flip to show up on // page load when we apply the style to reverse the backface... @@ -225,7 +228,7 @@ // While this used to work with a setTimeout of zero, at some point that became // unstable and the initial flip returned. The reason for this is unknown but we - // will temporarily use a short delay of 20 to mitigate this issue. + // will temporarily use a short delay of 20 to mitigate this issue. }, 20); self.attachEvents(); diff --git a/dist/jquery.flip.min.js b/dist/jquery.flip.min.js index 0af0205..53cfe2b 100644 --- a/dist/jquery.flip.min.js +++ b/dist/jquery.flip.min.js @@ -1,6 +1,6 @@ -/*! flip - v1.1.1 - 2016-05-25 +/*! flip - v1.1.2 - 2016-10-20 * https://github.com/nnattawat/flip * Copyright (c) 2016 Nattawat Nonsung; Licensed MIT */ -!function(a){var b=function(){var a,b=document.createElement("fakeelement"),c={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(a in c)if(void 0!==b.style[a])return c[a]},c=function(b,c,d){this.setting={axis:"y",reverse:!1,trigger:"click",speed:500,forceHeight:!1,forceWidth:!1,autoSize:!0,front:".front",back:".back"},this.setting=a.extend(this.setting,c),"string"!=typeof c.axis||"x"!==c.axis.toLowerCase()&&"y"!==c.axis.toLowerCase()||(this.setting.axis=c.axis.toLowerCase()),"boolean"==typeof c.reverse&&(this.setting.reverse=c.reverse),"string"==typeof c.trigger&&(this.setting.trigger=c.trigger.toLowerCase());var e=parseInt(c.speed);isNaN(e)||(this.setting.speed=e),"boolean"==typeof c.forceHeight&&(this.setting.forceHeight=c.forceHeight),"boolean"==typeof c.forceWidth&&(this.setting.forceWidth=c.forceWidth),"boolean"==typeof c.autoSize&&(this.setting.autoSize=c.autoSize),("string"==typeof c.front||c.front instanceof a)&&(this.setting.front=c.front),("string"==typeof c.back||c.back instanceof a)&&(this.setting.back=c.back),this.element=b,this.frontElement=this.getFrontElement(),this.backElement=this.getBackElement(),this.isFlipped=!1,this.init(d)};a.extend(c.prototype,{flipDone:function(a){var c=this;c.element.one(b(),function(){c.element.trigger("flip:done"),"function"==typeof a&&a.call(c.element)})},flip:function(a){if(!this.isFlipped){this.isFlipped=!0;var b="rotate"+this.setting.axis;this.frontElement.css({transform:b+(this.setting.reverse?"(-180deg)":"(180deg)"),"z-index":"0"}),this.backElement.css({transform:b+"(0deg)","z-index":"1"}),this.flipDone(a)}},unflip:function(a){if(this.isFlipped){this.isFlipped=!1;var b="rotate"+this.setting.axis;this.frontElement.css({transform:b+"(0deg)","z-index":"1"}),this.backElement.css({transform:b+(this.setting.reverse?"(180deg)":"(-180deg)"),"z-index":"0"}),this.flipDone(a)}},getFrontElement:function(){return this.setting.front instanceof a?this.setting.front:this.element.find(this.setting.front)},getBackElement:function(){return this.setting.back instanceof a?this.setting.back:this.element.find(this.setting.back)},init:function(a){var b=this,c=b.frontElement.add(b.backElement),d="rotate"+b.setting.axis,e=2*b.element["outer"+("rotatex"===d?"Height":"Width")](),f={perspective:e,position:"relative"},g={transform:d+"("+(b.setting.reverse?"180deg":"-180deg")+")","z-index":"0"},h={"backface-visibility":"hidden","transform-style":"preserve-3d",position:"absolute","z-index":"1"};b.setting.forceHeight?c.outerHeight(b.element.height()):b.setting.autoSize&&(h.height="100%"),b.setting.forceWidth?c.outerWidth(b.element.width()):b.setting.autoSize&&(h.width="100%"),(window.chrome||window.Intl&&Intl.v8BreakIterator)&&"CSS"in window&&(f["-webkit-transform-style"]="preserve-3d"),b.element.css(f),b.backElement.css(g),c.css(h).find("*").css({"backface-visibility":"hidden"}),setTimeout(function(){var d=b.setting.speed/1e3||.5;c.css({transition:"all "+d+"s ease-out"}),"function"==typeof a&&a.call(b.element)},20),b.attachEvents()},clickHandler:function(b){b||(b=window.event),this.element.find(a(b.target).closest('button, a, input[type="submit"]')).length||(this.isFlipped?this.unflip():this.flip())},hoverHandler:function(){var b=this;b.element.off("mouseleave.flip"),b.flip(),setTimeout(function(){b.element.on("mouseleave.flip",a.proxy(b.unflip,b)),b.element.is(":hover")||b.unflip()},b.setting.speed+150)},attachEvents:function(){var b=this;"click"===b.setting.trigger?b.element.on(a.fn.tap?"tap.flip":"click.flip",a.proxy(b.clickHandler,b)):"hover"===b.setting.trigger&&(b.element.on("mouseenter.flip",a.proxy(b.hoverHandler,b)),b.element.on("mouseleave.flip",a.proxy(b.unflip,b)))},flipChanged:function(a){this.element.trigger("flip:change"),"function"==typeof a&&a.call(this.element)},changeSettings:function(a,b){var c=this,d=!1;if(void 0!==a.axis&&c.setting.axis!==a.axis.toLowerCase()&&(c.setting.axis=a.axis.toLowerCase(),d=!0),void 0!==a.reverse&&c.setting.reverse!==a.reverse&&(c.setting.reverse=a.reverse,d=!0),d){var e=c.frontElement.add(c.backElement),f=e.css(["transition-property","transition-timing-function","transition-duration","transition-delay"]);e.css({transition:"none"});var g="rotate"+c.setting.axis;c.isFlipped?c.frontElement.css({transform:g+(c.setting.reverse?"(-180deg)":"(180deg)"),"z-index":"0"}):c.backElement.css({transform:g+(c.setting.reverse?"(180deg)":"(-180deg)"),"z-index":"0"}),setTimeout(function(){e.css(f),c.flipChanged(b)},0)}else c.flipChanged(b)}}),a.fn.flip=function(b,d){return"function"==typeof b&&(d=b),"string"==typeof b||"boolean"==typeof b?this.each(function(){var c=a(this).data("flip-model");"toggle"===b&&(b=!c.isFlipped),b?c.flip(d):c.unflip(d)}):this.each(function(){if(a(this).data("flip-model")){var e=a(this).data("flip-model");!b||void 0===b.axis&&void 0===b.reverse||e.changeSettings(b,d)}else a(this).data("flip-model",new c(a(this),b||{},d))}),this}}(jQuery); +!function(a){var b=function(){var a,b=document.createElement("fakeelement"),c={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(a in c)if(void 0!==b.style[a])return c[a]},c=function(b,c,d){this.setting={axis:"y",reverse:!1,trigger:"click",speed:500,forceHeight:!1,forceWidth:!1,autoSize:!0,front:".front",back:".back"},this.setting=a.extend(this.setting,c),"string"!=typeof c.axis||"x"!==c.axis.toLowerCase()&&"y"!==c.axis.toLowerCase()||(this.setting.axis=c.axis.toLowerCase()),"boolean"==typeof c.reverse&&(this.setting.reverse=c.reverse),"string"==typeof c.trigger&&(this.setting.trigger=c.trigger.toLowerCase());var e=parseInt(c.speed);isNaN(e)||(this.setting.speed=e),"boolean"==typeof c.forceHeight&&(this.setting.forceHeight=c.forceHeight),"boolean"==typeof c.forceWidth&&(this.setting.forceWidth=c.forceWidth),"boolean"==typeof c.autoSize&&(this.setting.autoSize=c.autoSize),("string"==typeof c.front||c.front instanceof a)&&(this.setting.front=c.front),("string"==typeof c.back||c.back instanceof a)&&(this.setting.back=c.back),this.element=b,this.frontElement=this.getFrontElement(),this.backElement=this.getBackElement(),this.isFlipped=!1,this.init(d)};a.extend(c.prototype,{flipDone:function(a){var c=this;c.element.one(b(),function(){c.element.trigger("flip:done"),"function"==typeof a&&a.call(c.element)})},flip:function(a){if(!this.isFlipped){this.isFlipped=!0;var b="rotate"+this.setting.axis;this.frontElement.css({transform:b+(this.setting.reverse?"(-180deg)":"(180deg)"),"z-index":"0"}),this.backElement.css({transform:b+"(0deg)","z-index":"1"}),this.flipDone(a)}},unflip:function(a){if(this.isFlipped){this.isFlipped=!1;var b="rotate"+this.setting.axis;this.frontElement.css({transform:b+"(0deg)","z-index":"1"}),this.backElement.css({transform:b+(this.setting.reverse?"(180deg)":"(-180deg)"),"z-index":"0"}),this.flipDone(a)}},getFrontElement:function(){return this.setting.front instanceof a?this.setting.front:this.element.find(this.setting.front)},getBackElement:function(){return this.setting.back instanceof a?this.setting.back:this.element.find(this.setting.back)},init:function(a){var b=this,c=b.frontElement.add(b.backElement),d="rotate"+b.setting.axis,e=2*b.element["outer"+("rotatex"===d?"Height":"Width")](),f={perspective:e,position:"relative"},g={transform:d+"("+(b.setting.reverse?"180deg":"-180deg")+")","z-index":"0",position:"relative"},h={"backface-visibility":"hidden","transform-style":"preserve-3d",position:"absolute","z-index":"1"};b.setting.forceHeight?c.outerHeight(b.element.height()):b.setting.autoSize&&(h.height="100%"),b.setting.forceWidth?c.outerWidth(b.element.width()):b.setting.autoSize&&(h.width="100%"),(window.chrome||window.Intl&&Intl.v8BreakIterator)&&"CSS"in window&&(f["-webkit-transform-style"]="preserve-3d"),c.css(h).find("*").css({"backface-visibility":"hidden"}),b.element.css(f),b.backElement.css(g),setTimeout(function(){var d=b.setting.speed/1e3||.5;c.css({transition:"all "+d+"s ease-out"}),"function"==typeof a&&a.call(b.element)},20),b.attachEvents()},clickHandler:function(b){b||(b=window.event),this.element.find(a(b.target).closest('button, a, input[type="submit"]')).length||(this.isFlipped?this.unflip():this.flip())},hoverHandler:function(){var b=this;b.element.off("mouseleave.flip"),b.flip(),setTimeout(function(){b.element.on("mouseleave.flip",a.proxy(b.unflip,b)),b.element.is(":hover")||b.unflip()},b.setting.speed+150)},attachEvents:function(){var b=this;"click"===b.setting.trigger?b.element.on(a.fn.tap?"tap.flip":"click.flip",a.proxy(b.clickHandler,b)):"hover"===b.setting.trigger&&(b.element.on("mouseenter.flip",a.proxy(b.hoverHandler,b)),b.element.on("mouseleave.flip",a.proxy(b.unflip,b)))},flipChanged:function(a){this.element.trigger("flip:change"),"function"==typeof a&&a.call(this.element)},changeSettings:function(a,b){var c=this,d=!1;if(void 0!==a.axis&&c.setting.axis!==a.axis.toLowerCase()&&(c.setting.axis=a.axis.toLowerCase(),d=!0),void 0!==a.reverse&&c.setting.reverse!==a.reverse&&(c.setting.reverse=a.reverse,d=!0),d){var e=c.frontElement.add(c.backElement),f=e.css(["transition-property","transition-timing-function","transition-duration","transition-delay"]);e.css({transition:"none"});var g="rotate"+c.setting.axis;c.isFlipped?c.frontElement.css({transform:g+(c.setting.reverse?"(-180deg)":"(180deg)"),"z-index":"0"}):c.backElement.css({transform:g+(c.setting.reverse?"(180deg)":"(-180deg)"),"z-index":"0"}),setTimeout(function(){e.css(f),c.flipChanged(b)},0)}else c.flipChanged(b)}}),a.fn.flip=function(b,d){return"function"==typeof b&&(d=b),"string"==typeof b||"boolean"==typeof b?this.each(function(){var c=a(this).data("flip-model");"toggle"===b&&(b=!c.isFlipped),b?c.flip(d):c.unflip(d)}):this.each(function(){if(a(this).data("flip-model")){var e=a(this).data("flip-model");!b||void 0===b.axis&&void 0===b.reverse||e.changeSettings(b,d)}else a(this).data("flip-model",new c(a(this),b||{},d))}),this}}(jQuery); //# sourceMappingURL=jquery.flip.min.js.map \ No newline at end of file diff --git a/dist/jquery.flip.min.js.map b/dist/jquery.flip.min.js.map index 3dfb0f2..fde9dee 100644 --- a/dist/jquery.flip.min.js.map +++ b/dist/jquery.flip.min.js.map @@ -1 +1 @@ -{"version":3,"file":"dist/jquery.flip.min.js","sources":["src/flip.js"],"names":["$","whichTransitionEvent","t","el","document","createElement","transitions","transition","OTransition","MozTransition","WebkitTransition","undefined","style","Flip","$el","options","callback","this","setting","axis","reverse","trigger","speed","forceHeight","forceWidth","autoSize","front","back","extend","toLowerCase","parseInt","isNaN","element","frontElement","getFrontElement","backElement","getBackElement","isFlipped","init","prototype","flipDone","self","one","call","flip","rotateAxis","css","transform","z-index","unflip","find","faces","add","perspective","elementCss","position","backElementCss","faceElementCss","backface-visibility","transform-style","outerHeight","height","outerWidth","width","window","chrome","Intl","v8BreakIterator","setTimeout","speedInSec","attachEvents","clickHandler","event","target","closest","length","hoverHandler","off","on","proxy","is","fn","tap","flipChanged","changeSettings","changeNeeded","savedTrans","each","data","jQuery"],"mappings":";;;;CAAC,SAAUA,GAMT,GAAIC,GAAuB,WACzB,GAAIC,GAAGC,EAAKC,SAASC,cAAc,eACnCC,GACEC,WAAoB,gBACpBC,YAAoB,iBACpBC,cAAoB,gBACpBC,iBAAoB,sBAGtB,KAAKR,IAAKI,GACR,GAAoBK,SAAhBR,EAAGS,MAAMV,GACX,MAAOI,GAAYJ,IAQrBW,EAAO,SAASC,EAAKC,EAASC,GAEhCC,KAAKC,SACHC,KAAM,IACNC,SAAS,EACTC,QAAS,QACTC,MAAO,IACPC,aAAa,EACbC,YAAY,EACZC,UAAU,EACVC,MAAO,SACPC,KAAM,SAGRV,KAAKC,QAAUlB,EAAE4B,OAAOX,KAAKC,QAASH,GAEV,gBAAjBA,GAAQI,MAAqD,MAA/BJ,EAAQI,KAAKU,eAAwD,MAA/Bd,EAAQI,KAAKU,gBAC1FZ,KAAKC,QAAQC,KAAOJ,EAAQI,KAAKU,eAGJ,iBAApBd,GAAQK,UACjBH,KAAKC,QAAQE,QAAUL,EAAQK,SAGF,gBAApBL,GAAQM,UACjBJ,KAAKC,QAAQG,QAAUN,EAAQM,QAAQQ,cAGzC,IAAIP,GAAQQ,SAASf,EAAQO,MACxBS,OAAMT,KACTL,KAAKC,QAAQI,MAAQA,GAGY,iBAAxBP,GAAQQ,cACjBN,KAAKC,QAAQK,YAAcR,EAAQQ,aAGH,iBAAvBR,GAAQS,aACjBP,KAAKC,QAAQM,WAAaT,EAAQS,YAGJ,iBAArBT,GAAQU,WACjBR,KAAKC,QAAQO,SAAWV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AAKR,aAAaa,KAChBC,UAAWF,GAAcJ,EAAKvB,QAAQE,QAAU,YAAc,YAC9D4B,UAAW,MAGbP,EAAKN,YAAYW,KACfC,UAAWF,GAAcJ,EAAKvB,QAAQE,QAAU,WAAa,aAC7D4B,UAAW,MAIfoB,WAAW,WACTjB,EAAML,IAAIwC,GACV7C,EAAK0C,YAAYnE,IAChB,OAGHyB,GAAK0C,YAAYnE,MASvBhB,EAAEiF,GAAGrC,KAAO,SAAU7B,EAASC,GAiC7B,MAhCuB,kBAAZD,KACTC,EAAWD,GAGU,gBAAZA,IAA2C,iBAAZA,GACxCE,KAAKsE,KAAK,WACR,GAAI3C,GAAO5C,EAAEiB,MAAMuE,KAAK,aAER,YAAZzE,IACFA,GAAW6B,EAAKP,WAGdtB,EACF6B,EAAKA,KAAK5B,GAEV4B,EAAKK,OAAOjC,KAIhBC,KAAKsE,KAAK,WACR,GAAIvF,EAAEiB,MAAMuE,KAAK,cAAe,CAC9B,GAAI5C,GAAO5C,EAAEiB,MAAMuE,KAAK,eAEpBzE,GAA6BJ,SAAjBI,EAAQI,MAA0CR,SAApBI,EAAQK,SACpDwB,EAAKwC,eAAerE,EAASC,OAG/BhB,GAAEiB,MAAMuE,KAAK,aAAc,GAAI3E,GAAKb,EAAEiB,MAAQF,MAAgBC,MAK7DC,OAGRwE"} \ No newline at end of file +{"version":3,"file":"dist/jquery.flip.min.js","sources":["src/flip.js"],"names":["$","whichTransitionEvent","t","el","document","createElement","transitions","transition","OTransition","MozTransition","WebkitTransition","undefined","style","Flip","$el","options","callback","this","setting","axis","reverse","trigger","speed","forceHeight","forceWidth","autoSize","front","back","extend","toLowerCase","parseInt","isNaN","element","frontElement","getFrontElement","backElement","getBackElement","isFlipped","init","prototype","flipDone","self","one","call","flip","rotateAxis","css","transform","z-index","unflip","find","faces","add","perspective","elementCss","position","backElementCss","faceElementCss","backface-visibility","transform-style","outerHeight","height","outerWidth","width","window","chrome","Intl","v8BreakIterator","setTimeout","speedInSec","attachEvents","clickHandler","event","target","closest","length","hoverHandler","off","on","proxy","is","fn","tap","flipChanged","changeSettings","changeNeeded","savedTrans","each","data","jQuery"],"mappings":";;;;CAAC,SAAUA,GAMT,GAAIC,GAAuB,WACzB,GAAIC,GAAGC,EAAKC,SAASC,cAAc,eACnCC,GACEC,WAAoB,gBACpBC,YAAoB,iBACpBC,cAAoB,gBACpBC,iBAAoB,sBAGtB,KAAKR,IAAKI,GACR,GAAoBK,SAAhBR,EAAGS,MAAMV,GACX,MAAOI,GAAYJ,IAQrBW,EAAO,SAASC,EAAKC,EAASC,GAEhCC,KAAKC,SACHC,KAAM,IACNC,SAAS,EACTC,QAAS,QACTC,MAAO,IACPC,aAAa,EACbC,YAAY,EACZC,UAAU,EACVC,MAAO,SACPC,KAAM,SAGRV,KAAKC,QAAUlB,EAAE4B,OAAOX,KAAKC,QAASH,GAEV,gBAAjBA,GAAQI,MAAqD,MAA/BJ,EAAQI,KAAKU,eAAwD,MAA/Bd,EAAQI,KAAKU,gBAC1FZ,KAAKC,QAAQC,KAAOJ,EAAQI,KAAKU,eAGJ,iBAApBd,GAAQK,UACjBH,KAAKC,QAAQE,QAAUL,EAAQK,SAGF,gBAApBL,GAAQM,UACjBJ,KAAKC,QAAQG,QAAUN,EAAQM,QAAQQ,cAGzC,IAAIP,GAAQQ,SAASf,EAAQO,MACxBS,OAAMT,KACTL,KAAKC,QAAQI,MAAQA,GAGY,iBAAxBP,GAAQQ,cACjBN,KAAKC,QAAQK,YAAcR,EAAQQ,aAGH,iBAAvBR,GAAQS,aACjBP,KAAKC,QAAQM,WAAaT,EAAQS,YAGJ,iBAArBT,GAAQU,WACjBR,KAAKC,QAAQO,SAAWV,EAAQU,WAGL,gBAAlBV,GAAQW,OAAsBX,EAAQW,gBAAiB1B,MAChEiB,KAAKC,QAAQQ,MAAQX,EAAQW,QAGH,gBAAjBX,GAAQY,MAAqBZ,EAAQY,eAAgB3B,MAC9DiB,KAAKC,QAAQS,KAAOZ,EAAQY,MAI9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AAW,WACTjB,EAAML,IAAIwC,GACV7C,EAAK0C,YAAYnE,IAChB,OAGHyB,GAAK0C,YAAYnE,MASvBhB,EAAEiF,GAAGrC,KAAO,SAAU7B,EAASC,GAiC7B,MAhCuB,kBAAZD,KACTC,EAAWD,GAGU,gBAAZA,IAA2C,iBAAZA,GACxCE,KAAKsE,KAAK,WACR,GAAI3C,GAAO5C,EAAEiB,MAAMuE,KAAK,aAER,YAAZzE,IACFA,GAAW6B,EAAKP,WAGdtB,EACF6B,EAAKA,KAAK5B,GAEV4B,EAAKK,OAAOjC,KAIhBC,KAAKsE,KAAK,WACR,GAAIvF,EAAEiB,MAAMuE,KAAK,cAAe,CAC9B,GAAI5C,GAAO5C,EAAEiB,MAAMuE,KAAK,eAEpBzE,GAA6BJ,SAAjBI,EAAQI,MAA0CR,SAApBI,EAAQK,SACpDwB,EAAKwC,eAAerE,EAASC,OAG/BhB,GAAEiB,MAAMuE,KAAK,aAAc,GAAI3E,GAAKb,EAAEiB,MAAQF,MAAgBC,MAK7DC,OAGRwE"} \ No newline at end of file diff --git a/package.json b/package.json index bf235ba..42d1c76 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "flip", - "version": "1.1.1", + "version": "1.1.2", "description": "jQuery Plugin - 3d Flip Content", "keywords": [ "jquery-plugin" diff --git a/src/flip.js b/src/flip.js index 16c1ac0..dfe07b9 100644 --- a/src/flip.js +++ b/src/flip.js @@ -1,6 +1,3 @@ -/*! flip - v1.1.1 - 2016-05-25 -* https://github.com/nnattawat/flip -* Copyright (c) 2016 Nattawat Nonsung; Licensed MIT */ (function( $ ) { /* * Private attributes and method