Skip to content
Browse files

minified version updated

  • Loading branch information...
1 parent 92e35d7 commit 0c7db1f49a2ca43d63ede902db65d34c85c9d170 @creativeaura committed
Showing with 6 additions and 6 deletions.
  1. +6 −6 dist/threesixty.min.js
View
12 dist/threesixty.min.js
@@ -2,9 +2,9 @@
a.imagePath+a.filePrefix+(a.loadedImages+1)+a.ext+(d.browser.msie?"?"+(new Date).getTime():"");f=d("<img>").attr("src",f).addClass("previous-image").appendTo(c);g.push(f);b.$el.find(a.imgList).append(c);d(f).load(function(){b.imageLoaded()})};b.imageLoaded=function(){a.loadedImages+=1;d(a.progress+" span").text(Math.floor(100*(a.loadedImages/a.totalFrames))+"%");a.loadedImages>=a.totalFrames?(g[0].removeClass("previous-image").addClass("current-image"),d(a.progress).fadeOut("slow",function(){d(this).hide();
b.showImages();b.showNavigation()})):b.loadImages()};b.showImages=function(){b.$el.css("background-image","none");b.$el.find(".txtC").fadeIn();b.$el.find(a.imgList).fadeIn();a.ready=!0;b.initEvents();b.refresh()};b.showNavigation=function(){if(a.navigation&&!a.navigation_init){var c,f,e,g;c=d("<div/>").attr("class","nav_bar");f=d("<a/>").attr({href:"#","class":"nav_bar_next"}).html("next");e=d("<a/>").attr({href:"#","class":"nav_bar_previous"}).html("previous");g=d("<a/>").attr({href:"#","class":"nav_bar_play"}).html("play");
c.append(e);c.append(g);c.append(f);b.$el.prepend(c);f.bind("mousedown touchstart",b.next);e.bind("mousedown touchstart",b.previous);g.bind("mousedown touchstart",b.play_stop);a.navigation_init=!0}};b.play_stop=function(c){c.preventDefault();a.autoplay?(a.autoplay=!1,d(c.currentTarget).removeClass("nav_bar_stop").addClass("nav_bar_play"),clearInterval(a.play),a.play=null):(a.autoplay=!0,a.play=setInterval(b.moveToNextFrame,40),d(c.currentTarget).removeClass("nav_bar_play").addClass("nav_bar_stop"))};
-b.next=function(c){c&&c.preventDefault();a.endFrame-=5;b.refresh()};b.previous=function(c){c&&c.preventDefault();a.endFrame+=1;b.refresh()};b.play=function(){a.autoplay||(a.autoplay=!0,a.play=setInterval(b.moveToNextFrame,40))};b.stop=function(){a.autoplay&&(a.autoplay=!1,clearInterval(a.play),a.play=null)};b.moveToNextFrame=function(){a.endFrame-=1;b.refresh()};b.initEvents=function(){b.$el.bind("mousedown touchstart touchmove touchend mousemove click",function(c){c.preventDefault();"mousedown"===
-c.type&&1===c.which||"touchstart"===c.type?(a.pointerStartPosX=b.getPointerEvent(c).pageX,a.dragging=!0):"touchmove"===c.type?b.trackPointer(c):"touchend"===c.type&&(a.dragging=!1);"click"===c.type&&!d.browser.msie&&b.$el.css("cursor","url(assets/images/hand_closed.png), auto")});d(document).bind("mouseup",function(){a.dragging=!1;d(this).css("cursor","none")});d(document).bind("mousemove",function(c){a.dragging?(c.preventDefault(),d.browser.msie||b.$el.css("cursor","url(assets/images/hand_closed.png), auto")):
-d.browser.msie||b.$el.css("cursor","url(assets/images/hand_open.png), auto");b.trackPointer(c)})};b.getPointerEvent=function(a){return a.originalEvent.targetTouches?a.originalEvent.targetTouches[0]:a};b.trackPointer=function(c){a.ready&&a.dragging&&(a.pointerEndPosX=b.getPointerEvent(c).pageX,a.monitorStartTime<(new Date).getTime()-a.monitorInt&&(a.pointerDistance=a.pointerEndPosX-a.pointerStartPosX,a.endFrame=a.currentFrame+Math.ceil((a.totalFrames-1)*a.speedMultiplier*(a.pointerDistance/b.$el.width())),
-b.refresh(),a.monitorStartTime=(new Date).getTime(),a.pointerStartPosX=b.getPointerEvent(c).pageX))};b.refresh=function(){0===a.ticker&&(a.ticker=setInterval(b.render,Math.round(1E3/a.framerate)))};b.render=function(){var c;a.currentFrame!==a.endFrame?(c=a.endFrame<a.currentFrame?Math.floor(0.1*(a.endFrame-a.currentFrame)):Math.ceil(0.1*(a.endFrame-a.currentFrame)),b.hidePreviousFrame(),a.currentFrame+=c,b.showCurrentFrame()):(window.clearInterval(a.ticker),a.ticker=0)};b.hidePreviousFrame=function(){g[b.getNormalizedCurrentFrame()].removeClass("current-image").addClass("previous-image")};
-b.showCurrentFrame=function(){g[b.getNormalizedCurrentFrame()].removeClass("previous-image").addClass("current-image")};b.getNormalizedCurrentFrame=function(){var b=Math.ceil(a.currentFrame%a.totalFrames);0>b&&(b+=a.totalFrames-1);return b};b.init()};d.ThreeSixty.defaultOptions={dragging:!1,ready:!1,pointerStartPosX:0,pointerEndPosX:0,pointerDistance:0,monitorStartTime:0,monitorInt:10,ticker:0,speedMultiplier:7,totalFrames:180,currentFrame:0,endFrame:0,loadedImages:0,framerate:60,domains:null,domain:"",
-parallel:!1,queueAmount:8,idle:0,filePrefix:"",ext:"png",height:300,width:300,styles:{},navigation:!1,autoplay:!1};d.fn.ThreeSixty=function(e){return Object.create(new d.ThreeSixty(this,e))}})(jQuery);"function"!==typeof Object.create&&(Object.create=function(d){function e(){}e.prototype=d;return new e});
+b.next=function(c){c&&c.preventDefault();a.endFrame-=5;b.refresh()};b.previous=function(c){c&&c.preventDefault();a.endFrame+=1;b.refresh()};b.play=function(){a.autoplay||(a.autoplay=!0,a.play=setInterval(b.moveToNextFrame,40))};b.stop=function(){a.autoplay&&(a.autoplay=!1,clearInterval(a.play),a.play=null)};b.moveToNextFrame=function(){a.endFrame=1===a.autoplayDirection?a.endFrame-1:a.endFrame+1;b.refresh()};b.initEvents=function(){b.$el.bind("mousedown touchstart touchmove touchend mousemove click",
+function(c){c.preventDefault();"mousedown"===c.type&&1===c.which||"touchstart"===c.type?(a.pointerStartPosX=b.getPointerEvent(c).pageX,a.dragging=!0):"touchmove"===c.type?b.trackPointer(c):"touchend"===c.type&&(a.dragging=!1);"click"===c.type&&!d.browser.msie&&b.$el.css("cursor","url(assets/images/hand_closed.png), auto")});d(document).bind("mouseup",function(){a.dragging=!1;d(this).css("cursor","none")});d(document).bind("mousemove",function(c){a.dragging?(c.preventDefault(),d.browser.msie||b.$el.css("cursor",
+"url(assets/images/hand_closed.png), auto")):d.browser.msie||b.$el.css("cursor","url(assets/images/hand_open.png), auto");b.trackPointer(c)})};b.getPointerEvent=function(a){return a.originalEvent.targetTouches?a.originalEvent.targetTouches[0]:a};b.trackPointer=function(c){a.ready&&a.dragging&&(a.pointerEndPosX=b.getPointerEvent(c).pageX,a.monitorStartTime<(new Date).getTime()-a.monitorInt&&(a.pointerDistance=a.pointerEndPosX-a.pointerStartPosX,a.endFrame=a.currentFrame+Math.ceil((a.totalFrames-1)*
+a.speedMultiplier*(a.pointerDistance/b.$el.width())),b.refresh(),a.monitorStartTime=(new Date).getTime(),a.pointerStartPosX=b.getPointerEvent(c).pageX))};b.refresh=function(){0===a.ticker&&(a.ticker=setInterval(b.render,Math.round(1E3/a.framerate)))};b.render=function(){var c;a.currentFrame!==a.endFrame?(c=a.endFrame<a.currentFrame?Math.floor(0.1*(a.endFrame-a.currentFrame)):Math.ceil(0.1*(a.endFrame-a.currentFrame)),b.hidePreviousFrame(),a.currentFrame+=c,b.showCurrentFrame()):(window.clearInterval(a.ticker),
+a.ticker=0)};b.hidePreviousFrame=function(){g[b.getNormalizedCurrentFrame()].removeClass("current-image").addClass("previous-image")};b.showCurrentFrame=function(){g[b.getNormalizedCurrentFrame()].removeClass("previous-image").addClass("current-image")};b.getNormalizedCurrentFrame=function(){var b=Math.ceil(a.currentFrame%a.totalFrames);0>b&&(b+=a.totalFrames-1);return b};b.init()};d.ThreeSixty.defaultOptions={dragging:!1,ready:!1,pointerStartPosX:0,pointerEndPosX:0,pointerDistance:0,monitorStartTime:0,
+monitorInt:10,ticker:0,speedMultiplier:7,totalFrames:180,currentFrame:0,endFrame:0,loadedImages:0,framerate:60,domains:null,domain:"",parallel:!1,queueAmount:8,idle:0,filePrefix:"",ext:"png",height:300,width:300,styles:{},navigation:!1,autoplay:!1,autoplayDirection:1};d.fn.ThreeSixty=function(e){return Object.create(new d.ThreeSixty(this,e))}})(jQuery);"function"!==typeof Object.create&&(Object.create=function(d){function e(){}e.prototype=d;return new e});

0 comments on commit 0c7db1f

Please sign in to comment.
Something went wrong with that request. Please try again.