-
Notifications
You must be signed in to change notification settings - Fork 6
/
phase-slider.min.js
1 lines (1 loc) · 18.4 KB
/
phase-slider.min.js
1
var phaseSlider=phaseSlider||{};phaseSlider=function(o){var i=this;o.phaseSlider=i,i.game=o,i.locked=!1,i.slideIndex=0,i.slider_timer=null,i.tweenObj={};var t="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFgAAACACAYAAACP+K52AAAOOUlEQVR4Xu2dBZQlRxWGE9zdEmwWh+CwBCfBQnB3wuDuHgLs4u6acGBxJ0GCwyFYFgsECc6ZAAkWEg4WCPp/c14PPW/nvb5/dVW/em/3nnPP7Ozcqq76u7q6rvbuu+2iogjsXrT3XZ3vtrMBfFbd8yuJLym+gPgsYjD4q/h34p+KjxafmGtt7AwAX1pg3V18S/GVxacKgHeMZD4mfrf4mwH5iSKLDPCNNesDxfv2AWgE8Av08/3i/7p9LSLAFxcIrxHv54LRIf91/f0h7opeNIDvJwBeKT5TZnCb7v6lf2wVPye6mhcFYPZVgH1YIWDHuz1M/8G+fnLX9RYB4NNqkm8T36Vrspn//kX1x4vzT9P6nXeAz6DJvW800cz4hbr7hqRuJv7DJOl5BvjMmtSHxTcMQVFO6PvqmhPLbza6xLwCfHZNhnPqtXvg9h+1PUnMz3OJT92jLxSUG4l/Md7HPAJ8Hk3iU+KrJADyK7V5k/hwMRrbP0Z9nEY/9xo97vfVz0sl9P1ztbnO+EqeN4D31AQ+Lb6cCcDfJH+Q+NXif3a05URygPglo5XtXIo9+XrivzeN5gngJQ36M2IUCYd+KeH9xeyVDl1EwmxDrGyHuImPmDeAsScA7oWcmUr2J2JeQDvsjcF+2Js/Id4clEcMdfoGYo5xc2FNu6LGybZwPmOSiH5PfBPxhm93oy8scB8ZgRZtdpQErw7YtW8R1xitoHNGZzaSwwKGLWLi+dTs74yS/4CYrSZKt+bG1AwwjxkrhxXk0JckfAvxVA3L6XAki8YIyLcKtuWks1+tALNSmAwrxyG2ktuKOTWUIMbzNfHlA51zvt6zRoBvr4G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MZ2SFefDiuCRo6RAQb1c8pkWL9Xr//5mwgMnYaYPRPki3wnDmEr4JEZrJ6UkXbOI0wYXHcuLUQNbSScXCZqZoRkaXxEM51l3B9UufAS5BgYtOCC92WH41smWUxhTMuDfINTleo1Ph5ui9V5bx43Ab47ethmNAZiheo+3GTabkH+4psCjD374uMC4Kg5BhEm2G6146OH/Q7yFGhouNS1hs+YB5390yOXj81jnxePiBYS0vFlLyr/p4CmAm56Z+2MFMTamsKmrWfCMAszJufz5y72eFZQmkSaVxoGWueogCzUcaS/bOPOBUByQWG8lqKU+hruVmQA3CzYWqSMUgwFEoSoJKpWVMdXef95QDcXBQHEcV423eQAqME7xxHQk1F4R22tOnULgA3K9GbhkwZSr1wFqXWJMh6pBj1Cy1hfbHdVLhQCgxXZLIbAZlEFnwM5FtgcOAQ/42YPFx8F7WUdrn7s8eXBtgWYHOfsAXgnn/hMwDI3H90EUTR0QAAAABJRU5ErkJggg==";return o.load.image("slider_chevron_left",t),o.load.image("slider_chevron_right",e),i.goToNext=function(){if(i.locked=!0,"horizontal"===i.options._mode){var t=i.sliderMainGroup.x+-1*i.options._width;if(i.slideIndex>=i.options._objects.length-1&&i.options.autoAnimate===!1)return i.stopSlider(),!1;if(i.options.autoAnimate===!0&&i.slideIndex>=i.options._objects.length-1)return i.slideIndex=0,i.sliderMainGroup.x=i.options._x,this.locked=!1,!0;i.tweenObj=o.add.tween(i.sliderMainGroup).to({x:t},i.options.animationDuration,i.options.animationEasing,!0,0,0,!1),i.tweenObj.onComplete.add(function(){this.locked=!1,this.slideIndex+=1,i.options.autoAnimate===!1&&this.slideIndex>=i.options._objects.length-1&&i.options._showHandles===!0&&(this.sliderControlsGroup.children[0].alpha=0),i.options._showHandles===!0&&(this.sliderControlsGroup.children[1].alpha=1)},i)}else{var e;if("vertical-from-top"===i.options._mode?e=i.sliderMainGroup.y+i.options._height:"vertical-from-bottom"===i.options._mode&&(e=i.sliderMainGroup.y+-1*i.options._height),i.slideIndex>=i.options._objects.length-1&&i.options.autoAnimate===!1)return i.stopSlider(),!1;if(i.options.autoAnimate===!0&&i.slideIndex>=i.options._objects.length-1)return i.slideIndex=0,i.sliderMainGroup.y=i.options._y,this.locked=!1,!0;i.tweenObj=o.add.tween(i.sliderMainGroup).to({y:e},i.options.animationDuration,i.options.animationEasing,!0,0,0,!1),i.tweenObj.onComplete.add(function(){this.locked=!1,this.slideIndex+=1,i.options.autoAnimate===!1&&this.slideIndex>=i.options._objects.length-1&&i.options._showHandles===!0&&(this.sliderControlsGroup.children[0].alpha=0),i.options._showHandles===!0&&(this.sliderControlsGroup.children[1].alpha=1)},i)}},i.goToPrev=function(){if(i.locked=!0,"horizontal"===i.options._mode){var t=i.sliderMainGroup.x+i.options._width;if(i.slideIndex<=0&&i.options.autoAnimate===!1)return i.stopSlider(),!1;i.tweenObj=o.add.tween(i.sliderMainGroup).to({x:t},i.options.animationDuration,i.options.animationEasing,!0,0,0,!1),i.tweenObj.onComplete.add(function(){this.locked=!1,this.slideIndex-=1,this.slideIndex<0&&(this.slideIndex=0),i.options.infiniteLoop===!1&&this.slideIndex<=0&&i.options._showHandles===!0&&(this.sliderControlsGroup.children[1].alpha=0),i.options._showHandles===!0&&(this.sliderControlsGroup.children[0].alpha=1)},i)}else{var e;if("vertical-from-top"===i.options._mode?e=i.sliderMainGroup.y+-1*i.options._height:"vertical-from-bottom"===i.options._mode&&(e=i.sliderMainGroup.y+i.options._height),i.slideIndex<=0&&i.options.autoAnimate===!1)return i.stopSlider(),!1;i.tweenObj=o.add.tween(i.sliderMainGroup).to({y:e},i.options.animationDuration,i.options.animationEasing,!0,0,0,!1),i.tweenObj.onComplete.add(function(){this.locked=!1,this.slideIndex-=1,this.slideIndex<0&&(this.slideIndex=0),i.options.autoAnimate===!1&&this.slideIndex<=0&&i.options._showHandles===!0&&(this.sliderControlsGroup.children[1].alpha=0),i.options._showHandles===!0&&(this.sliderControlsGroup.children[0].alpha=1)},i)}},i.startSlider=function(){var t=o.time.create(!1);t.start(),t.loop(Phaser.Timer.SECOND*i.options.animationDelay,i.goToNext,i),i.slider_timer=t},i.stopSlider=function(){return null===i.slider_timer?!1:(i.slider_timer.stop(!0),void(i.slider_timer=null))},i.moveToSlide=function(t,e){var n;if(t>=i.options._objects.length)return!1;if("horizontal"===i.options._mode)if(n=i.options._x-i.options._width*t,e===!0){o.add.tween(i.sliderMainGroup).to({x:n},i.options.animationDuration,i.options.animationEasing,!0,0,0,!1)}else i.sliderMainGroup.x=n;else"vertical-from-top"===i.options._mode||"vertical-from-bottom"===i.options._mode},i.onDragStart=function(o,t,e,n){i.dragInit=t.x,i.lastDrag=t.x},i.onDragStop=function(o){},i.dragUpdate=function(o,t,e,n){var s=e;if(t.x<i.dragInit){var a=Math.abs(t.x)-Math.abs(i.lastDrag);s=0>a?i.sliderMainGroup.x-1:i.sliderMainGroup.x+1}else{var a=Math.abs(t.x)-Math.abs(i.lastDrag);s=0>a?i.sliderMainGroup.x-1:i.sliderMainGroup.x+1}s<=-1*(i.options._x+i.options._width*(i.options._objects.length-2))?s=-1*(i.options._x+i.options._width*(i.options._objects.length-2)):s>=i.options._x&&(s=i.options._x),i.sliderMainGroup.x=s,i.lastDrag=t.x},{createSlider:function(t){i.slideIndex=0,i.options={_mode:t.mode||"horizontal",_width:t.width||500,_height:t.height||400,_animationEffect:t.animationEffect||"slide",autoAnimate:t.autoAnimate||!1,infiniteLoop:t.infiniteLoop||!1,animationDelay:t.animationDelay||2,animationDuration:t.animationDuration||600,animationEasing:t.animationEasing||Phaser.Easing.Cubic.Out,_x:t.x||0,_y:t.y||0,_objects:t.objects||[],sliderBG:t.sliderBG||3527392,customSliderBG:t.customSliderBG||!1,sliderBGAlpha:t.sliderBGAlpha||1,_customHandleNext:t.customHandleNext||"",_customHandlePrev:t.customHandlePrev||"",_showHandles:void 0==t.showHandles?!0:t.showHandles,_onNextCallback:t.onNextCallback||!1,_onPrevCallback:t.onPrevCallback||!1,_addModal:t.modal||!1,_modalAlpha:t.modalAlpha||.7,_staticElements:t.staticElements||[]};var e;i._modal={},i.options._addModal===!0?(i._modal=o.add.graphics(o.width,o.height),i._modal.beginFill(0,i.options._modalAlpha),i._modal.x=0,i._modal.y=0,i._modal.inputEnabled=!0,i._modal.drawRect(0,0,i.game.width,i.game.height)):i._modal=!1,i.sliderBGGroup=i.game.add.group(),i.sliderMainGroup=i.game.add.group(),i.sliderBGGroup.width=i.options._width,i.sliderMainGroup.width=i.options._width,"horizontal"===i.options._mode?(i.sliderMainGroup.width=i.options._width*i.options._objects.length,0===i.options._objects.length&&(i.sliderMainGroup.width=i.options._width)):(i.sliderMainGroup.height=i.options._height*i.options._objects.length,0===i.options._objects.length&&(i.sliderMainGroup.height=i.options._height)),i.sliderMainGroup.height=i.options._height,i.sliderMainGroup.x=i.options._x,i.sliderMainGroup.y=i.options._y,i.sliderBGGroup.height=i.options._height,i.sliderBGGroup.x=i.options._x,i.sliderBGGroup.y=i.options._y,i.sliderControlsGroup=i.game.add.group(),i.sliderControlsGroup.width=i.options._width,i.sliderControlsGroup.height=i.options._height,i.sliderControlsGroup.x=i.options._x,i.sliderControlsGroup.y=i.options._y;var n=o.add.graphics(0,0);if(n.beginFill(16777215),n.drawRect(i.options._x,i.options._y,i.options._width,i.options._height),i.sliderMainGroup.mask=n,i.options.customSliderBG===!1?(e=o.add.graphics(i.options._width,i.options._height),e.beginFill(i.options.sliderBG,i.options.sliderBGAlpha),e.x=i.options._x,e.y=i.options._y,e.drawRect(0,0,i.options._width,i.options._height),i.sliderMainGroup.add(e)):i.sliderBGGroup.add(i.options.customSliderBG),i.options._showHandles===!0){var s,a;""===i.options._customHandleNext?(s=o.add.image(0,0,"slider_chevron_right"),s.scale.setTo(.6,.6)):s=o.add.image(0,0,i.options._customHandleNext),s.x=i.options._width-(s.width+10),s.y=i.options._height/2-s.height/2,s.inputEnabled=!0,s.events.onInputDown.add(function(o,t){i.options._onNextCallback&&i.options._onNextCallback(),i.tweenObj.isRunning!==!0&&(i.stopSlider(),i.goToNext())},i),""===i.options._customHandlePrev?(a=o.add.image(0,0,"slider_chevron_left"),a.scale.setTo(.6,.6)):a=o.add.image(0,0,i.options._customHandlePrev),a.x=10,a.y=i.options._height/2-a.height/2,a.inputEnabled=!0,a.events.onInputDown.add(function(o,t){i.options._onPrevCallback&&i.options._onPrevCallback(),i.tweenObj.isRunning!==!0&&(i.stopSlider(),i.goToPrev())},i),i.options.infiniteLoop===!1&&(a.alpha=0)}if(i.options._objects.length>0){for(var d=i.options._objects.slice(0),r=Number(d.length),l=0;r>l;l++){"horizontal"===i.options._mode?d[l].x=i.options._width*l:"vertical-from-top"===i.options._mode?d[l].y=i.options._height*l*-1:"vertical-from-bottom"===i.options._mode&&(d[l].y=i.options._height*l),i.sliderMainGroup.add(d[l])}i.options._objects=i.sliderMainGroup.children}if(i.options._staticElements.length>0)for(var l=0;l<i.options._staticElements.length;l++)o.world.bringToTop(i.options._staticElements[l]),i.sliderBGGroup.add(i.options._staticElements[l]);i.options._showHandles===!0&&(i.sliderControlsGroup.add(s),i.sliderControlsGroup.add(a)),i.options.autoAnimate===!0&&i.startSlider()},startSlider:function(){i.startSlider()},stopSlider:function(){i.startSlider()},moveToSlide:function(o,t){i.moveToSlide(o,t)},goToNext:function(){i.goToNext()},goToPrev:function(){i.goToPrev()},getCurrentIndex:function(){return i.slideIndex},refreshSlider:function(){},removeItemAt:function(o){i.sliderMainGroup.removeChildAt(o),i.options._objects=i.sliderMainGroup.children},hideSlider:function(){i.sliderMainGroup.visible=!1,i.sliderControlsGroup.visible=!1,i.sliderBGGroup.visible=!1,i._modal&&(i._modal.visible=!1)},showSlider:function(){i.sliderMainGroup.visible=!0,i.sliderControlsGroup.visible=!0,i.sliderBGGroup.visible=!0,i._modal&&(i._modal.visible=!0)}}};