All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.resources.bower_components.radial-svg-slider-jwebswing.js.main.min.js Maven / Gradle / Ivy

There is a newer version: 0.66.0.1
Show newest version

jQuery(document).ready(function(b){var d=400,f=(1000/60/d)/4,a=e(0.42,0.03,0.77,0.63,f);var c=function(g){this.element=g;this.slider=this.element.find(".cd-radial-slider");this.slides=this.slider.children("li");this.slidesNumber=this.slides.length;this.visibleIndex=0;this.nextVisible=1;this.prevVisible=this.slidesNumber-1;this.navigation=this.element.find(".cd-radial-slider-navigation");this.animating=false;this.mask=this.element.find(".cd-round-mask");this.leftMask=this.mask.find("mask").eq(0);this.rightMask=this.mask.find("mask").eq(1);this.bindEvents()};c.prototype.bindEvents=function(){var g=this;this.navigation.on("click",function(h){if(!g.animating){g.animating=true;h.preventDefault();var i=(b(h.target).hasClass("next"))?"next":"prev";g.updateIndexes(i);g.updateSlides(i)}})};c.prototype.updateIndexes=function(g){if(g=="next"){this.prevVisible=this.visibleIndex;this.visibleIndex=this.nextVisible;this.nextVisible=(this.nextVisible+10)?this.prevVisible-1:this.slidesNumber-1}};c.prototype.updateSlides=function(m){var g=this;var k=Snap("#"+this.slides.eq(this.visibleIndex).find("circle").attr("id")),l=Snap("#"+this.slides.eq(this.prevVisible).find("circle").attr("id")),j=Snap("#"+this.slides.eq(this.nextVisible).find("circle").attr("id"));var i=this.slider.data("radius1"),h=this.slider.data("radius2"),n=(m=="next")?this.slider.data("centerx2"):this.slider.data("centerx1");this.slides.eq(this.visibleIndex).addClass("is-animating").removeClass("next-slide prev-slide");if(m=="next"){this.slides.eq(this.visibleIndex).addClass("content-reveal-left");this.slides.eq(this.prevVisible).addClass("content-hide-left");this.slides.eq(this.visibleIndex).find("image").attr("style","mask: url(#"+this.leftMask.attr("id")+")");j.attr({r:i,cx:g.slider.data("centerx2"),});this.slides.eq(this.nextVisible).addClass("next-slide move-up");this.slides.filter(".prev-slide").addClass("scale-down")}else{this.slides.eq(this.visibleIndex).addClass("content-reveal-right");this.slides.eq(this.nextVisible).addClass("content-hide-right");this.slides.eq(this.visibleIndex).find("image").attr("style","mask: url(#"+this.rightMask.attr("id")+")");l.attr({r:i,cx:this.slider.data("centerx1"),});this.slides.eq(this.prevVisible).addClass("prev-slide move-up");this.slides.filter(".next-slide").addClass("scale-down")}k.attr({r:i,cx:n,}).animate({r:h},d,a,function(){if(m=="next"){g.slides.filter(".prev-slide").removeClass("prev-slide scale-down");l.attr({r:i,cx:g.slider.data("centerx1"),});g.slides.eq(g.prevVisible).removeClass("visible").addClass("prev-slide")}else{g.slides.filter(".next-slide").removeClass("next-slide scale-down");j.attr({r:i,cx:g.slider.data("centerx2"),});g.slides.eq(g.nextVisible).removeClass("visible").addClass("next-slide")}g.slides.eq(g.visibleIndex).removeClass("is-animating").addClass("visible").find("image").removeAttr("style");g.slides.filter(".move-up").removeClass("move-up");setTimeout(function(){g.slides.eq(g.visibleIndex).removeClass("content-reveal-left content-reveal-right");g.slides.eq(g.prevVisible).removeClass("content-hide-left content-hide-right");g.slides.eq(g.nextVisible).removeClass("content-hide-left content-hide-right");g.animating=false},100)})};b(".cd-radial-slider-wrapper").each(function(){new c(b(this))});function e(j,l,h,k,n){var i=function(p){var o=1-p;return 3*o*o*p*j+3*o*p*p*h+p*p*p};var g=function(p){var o=1-p;return 3*o*o*p*l+3*o*p*p*k+p*p*p};var m=function(p){var o=1-p;return 3*(2*(p-1)*p+o*o)*j+3*(-p*p*p+2*o*p)*h};return function(r){var o=r,w,v,s,p,u,q;for(s=o,q=0;q<8;q++){p=i(s)-o;if(Math.abs(p)v){return g(v)}while(wp){w=s}else{v=s}s=(v-w)*0.5+w}return g(s)}}});

 




© 2015 - 2024 Weber Informatics LLC | Privacy Policy