core/skin/creativewebstudio.ru/revolution/js/extensions/revolution.extension.layera...

7 lines
55 KiB
JavaScript
Raw Normal View History

2022-12-17 18:15:09 +05:00
/************************************************
* REVOLUTION 5.4.6.4 EXTENSION - LAYER ANIMATION
* @version: 3.6.4 (28.11.2017)
* @requires jquery.themepunch.revolution.js
* @author ThemePunch
************************************************/
!function(e){"use strict";function i(e,i,t,a,o,r,n){var s=e.find(i);s.css("borderWidth",r+"px"),s.css(t,0-r+"px"),s.css(a,"0px solid transparent"),s.css(o,n)}var t=jQuery.fn.revolution,a=(t.is_mobile(),t.is_android(),{alias:"LayerAnimation Min JS",name:"revolution.extensions.layeranimation.min.js",min_core:"5.4.6.4",version:"3.6.4"});jQuery.extend(!0,t,{updateMarkup:function(e,i){var t=jQuery(e).data();if(void 0!==t.start&&!t.frames_added&&void 0===t.frames){var a=new Array,o=_(c(),t.transform_in,void 0,!1),r=_(c(),t.transform_out,void 0,!1),n=_(c(),t.transform_hover,void 0,!1);jQuery.isNumeric(t.end)&&jQuery.isNumeric(t.start)&&jQuery.isNumeric(o.speed)&&(t.end=parseInt(t.end,0)-(parseInt(t.start,0)+parseFloat(o.speed,0))),a.push({frame:"0",delay:t.start,from:t.transform_in,to:t.transform_idle,split:t.splitin,speed:o.speed,ease:o.anim.ease,mask:t.mask_in,splitdelay:t.elementdelay}),a.push({frame:"5",delay:t.end,to:t.transform_out,split:t.splitout,speed:r.speed,ease:r.anim.ease,mask:t.mask_out,splitdelay:t.elementdelay}),t.transform_hover&&a.push({frame:"hover",to:t.transform_hover,style:t.style_hover,speed:n.speed,ease:n.anim.ease,splitdelay:t.elementdelay}),t.frames=a}if(!t.frames_added){if(t.inframeindex=0,t.outframeindex=-1,t.hoverframeindex=-1,void 0!==t.frames)for(var s=0;s<t.frames.length;s++)void 0!==t.frames[s].sfx_effect&&t.frames[s].sfx_effect.indexOf("block")>=0&&(0===s?(t.frames[s].from="o:0",t.frames[s].to="o:1"):t.frames[s].to="o:0",t._sfx="block"),void 0===t.frames[0].from&&(t.frames[0].from="o:inherit"),0===t.frames[0].delay&&(t.frames[0].delay=20),"hover"===t.frames[s].frame?t.hoverframeindex=s:"frame_999"!==t.frames[s].frame&&"frame_out"!==t.frames[s].frame&&"last"!==t.frames[s].frame&&"end"!==t.frames[s].frame||(t.outframeindex=s),void 0!==t.frames[s].split&&t.frames[s].split.match(/chars|words|lines/g)&&(t.splittext=!0);t.outframeindex=-1===t.outframeindex?-1===t.hoverframeindex?t.frames.length-1:t.frames.length-2:t.outframeindex,t.frames_added=!0}},animcompleted:function(e,i){var a=e.data(),o=a.videotype,r=a.autoplay,n=a.autoplayonlyfirsttime;void 0!=o&&"none"!=o&&(1==r||"true"==r||"on"==r||"1sttime"==r||n?(("carousel"!==i.sliderType||"carousel"===i.sliderType&&"on"===i.carousel.showLayersAllTime&&e.closest("li").hasClass("active-revslide")||"carousel"===i.sliderType&&"on"!==i.carousel.showLayersAllTime&&e.closest("li").hasClass("active-revslide"))&&t.playVideo(e,i),t.toggleState(e.data("videotoggledby")),(n||"1sttime"==r)&&(a.autoplayonlyfirsttime=!1,a.autoplay="off")):("no1sttime"==r&&(a.datasetautoplay="on"),t.unToggleState(e.data("videotoggledby"))))},handleStaticLayers:function(e,i){var t=parseInt(e.data("startslide"),0),a=parseInt(e.data("endslide"),0);t<0&&(t=0),a<0&&(a=i.realslideamount),0===t&&a===i.realslideamount-1&&(a=i.realslideamount+1),e.data("startslide",t),e.data("endslide",a)},animateTheCaptions:function(e){if("stop"===t.compare_version(a).check)return!1;var i=e.opt,o=e.slide,r=e.recall,n=e.maintimeline,s=e.preset,d=e.startslideanimat,l="carousel"===i.sliderType?0:i.width/2-i.gridwidth[i.curWinRange]*i.bw/2,m=o.data("index");if(i.layers=i.layers||new Object,i.layers[m]=i.layers[m]||o.find(".tp-caption"),i.layers.static=i.layers.static||i.c.find(".tp-static-layers").find(".tp-caption"),void 0===i.timelines&&t.createTimelineStructure(i),i.conh=i.c.height(),i.conw=i.c.width(),i.ulw=i.ul.width(),i.ulh=i.ul.height(),i.debugMode){o.addClass("indebugmode"),o.find(".helpgrid").remove(),i.c.find(".hglayerinfo").remove(),o.append('<div class="helpgrid" style="width:'+i.gridwidth[i.curWinRange]*i.bw+"px;height:"+i.gridheight[i.curWinRange]*i.bw+'px;"></div>');var c=o.find(".helpgrid");c.append('<div class="hginfo">Zoom:'+Math.round(100*i.bw)+"% &nbsp;&nbsp;&nbsp; Device Level:"+i.curWinRange+"&nbsp;&nbsp;&nbsp; Grid Preset:"+i.gridwidth[i.curWinRange]+"x"+i.gridheight[i.curWinRange]+"</div>"),i.c.append('<div class="hglayerinfo"></div>'),c.append('<div class="tlhg"></div>')}void 0!==m&&i.layers[m]&&jQuery.each(i.layers[m],function(e,a){var o=jQuery(this);t.updateMarkup(this,i),t.prepareSingl