summaryrefslogtreecommitdiff
path: root/public/static/js/marquee.min.js
diff options
context:
space:
mode:
authorDaniel Friesel <daniel.friesel@uos.de>2021-08-31 17:56:35 +0200
committerDaniel Friesel <daniel.friesel@uos.de>2021-08-31 17:56:35 +0200
commitf88817d98eedc3f0c99857e842127a5f4b78fba2 (patch)
tree24fcb5fb2b621e51250d154ffb9656b3c333367f /public/static/js/marquee.min.js
parent39746c144b1bcfccaaae1dc9534c3017c4814bf5 (diff)
Add past option
Diffstat (limited to 'public/static/js/marquee.min.js')
-rw-r--r--public/static/js/marquee.min.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/public/static/js/marquee.min.js b/public/static/js/marquee.min.js
index 5c54357..865a9f7 100644
--- a/public/static/js/marquee.min.js
+++ b/public/static/js/marquee.min.js
@@ -1 +1 @@
-!function(t){t.fn.marquee=function(i){function a(t,i,a){var e=a.behavior,r=a.width,s=a.dir;return"alternate"==e?1==t?i[a.widthAxis]-2*r:r:"slide"==e?-1==t?-1==s?i[a.widthAxis]:r:-1==s?i[a.widthAxis]-2*r:0:-1==t?i[a.widthAxis]:0}function e(){for(var i=r.length,s=null,d=null,l={},o=[],n=!1;i--;)s=r[i],d=t(s),l=d.data("marqueeState"),!0!==d.data("paused")?(s[l.axis]+=l.scrollamount*l.dir,n=-1==l.dir?s[l.axis]<=a(-1*l.dir,s,l):s[l.axis]>=a(-1*l.dir,s,l),"scroll"==l.behavior&&l.last==s[l.axis]||"alternate"==l.behavior&&n&&-1!=l.last||"slide"==l.behavior&&n&&-1!=l.last?("alternate"==l.behavior&&(l.dir*=-1),l.last=-1,d.trigger("stop"),l.loops--,0===l.loops?("slide"!=l.behavior?s[l.axis]=a(l.dir,s,l):s[l.axis]=a(-1*l.dir,s,l),d.trigger("end")):(o.push(s),d.trigger("start"),s[l.axis]=a(l.dir,s,l))):o.push(s),l.last=s[l.axis],d.data("marqueeState",l)):o.push(s);r=o,r.length&&setTimeout(e,25)}var r=[],s=this.length;return this.each(function(d){var l=t(this),o=l.attr("width")||l.width(),n=l.attr("height")||l.height(),h=l.after("<div "+(i?'class="'+i+'" ':"")+'style="display: block-inline; width: '+o+"px; height: "+n+'px; overflow: hidden;"><div style="float: left; white-space: nowrap;">'+l.html()+"</div></div>").next(),u=h.get(0),p=(l.attr("direction")||"left").toLowerCase(),c={dir:/down|right/.test(p)?-1:1,axis:/left|right/.test(p)?"scrollLeft":"scrollTop",widthAxis:/left|right/.test(p)?"scrollWidth":"scrollHeight",last:-1,loops:l.attr("loop")||-1,scrollamount:l.attr("scrollamount")||this.scrollAmount||2,behavior:(l.attr("behavior")||"scroll").toLowerCase(),width:/left|right/.test(p)?o:n};-1==l.attr("loop")&&"slide"==c.behavior&&(c.loops=1),l.remove(),/left|right/.test(p)?h.find("> div").css("padding","0 "+o+"px"):h.find("> div").css("padding",n+"px 0"),h.bind("stop",function(){h.data("paused",!0)}).bind("pause",function(){h.data("paused",!0)}).bind("start",function(){h.data("paused",!1)}).bind("unpause",function(){h.data("paused",!1)}).data("marqueeState",c),r.push(u),u[c.axis]=a(c.dir,u,c),h.trigger("start"),d+1==s&&e()}),t(r)}}(jQuery);
+!function(c){c.fn.marquee=function(o){var n=[],h=this.length;function u(t,i,a){var e=a.behavior,r=a.width,s=a.dir;return"alternate"==e?1==t?i[a.widthAxis]-2*r:r:"slide"==e?-1==t?-1==s?i[a.widthAxis]:r:-1==s?i[a.widthAxis]-2*r:0:-1==t?i[a.widthAxis]:0}function p(){for(var t,i=n.length,a=null,e=null,r={},s=[];i--;)a=n[i],r=(e=c(a)).data("marqueeState"),!0!==e.data("paused")?(a[r.axis]+=r.scrollamount*r.dir,t=-1==r.dir?a[r.axis]<=u(-1*r.dir,a,r):a[r.axis]>=u(-1*r.dir,a,r),"scroll"==r.behavior&&r.last==a[r.axis]||"alternate"==r.behavior&&t&&-1!=r.last||"slide"==r.behavior&&t&&-1!=r.last?("alternate"==r.behavior&&(r.dir*=-1),r.last=-1,e.trigger("stop"),r.loops--,0===r.loops?("slide"!=r.behavior?a[r.axis]=u(r.dir,a,r):a[r.axis]=u(-1*r.dir,a,r),e.trigger("end")):(s.push(a),e.trigger("start"),a[r.axis]=u(r.dir,a,r))):s.push(a),r.last=a[r.axis],e.data("marqueeState",r)):s.push(a);(n=s).length&&setTimeout(p,25)}return this.each(function(t){var i=c(this),a=i.attr("width")||i.width(),e=i.attr("height")||i.height(),r=i.after("<div "+(o?'class="'+o+'" ':"")+'style="display: block-inline; width: '+a+"px; height: "+e+'px; overflow: hidden;"><div style="float: left; white-space: nowrap;">'+i.html()+"</div></div>").next(),s=r.get(0),d=(i.attr("direction")||"left").toLowerCase(),l={dir:/down|right/.test(d)?-1:1,axis:/left|right/.test(d)?"scrollLeft":"scrollTop",widthAxis:/left|right/.test(d)?"scrollWidth":"scrollHeight",last:-1,loops:i.attr("loop")||-1,scrollamount:i.attr("scrollamount")||this.scrollAmount||2,behavior:(i.attr("behavior")||"scroll").toLowerCase(),width:/left|right/.test(d)?a:e};-1==i.attr("loop")&&"slide"==l.behavior&&(l.loops=1),i.remove(),/left|right/.test(d)?r.find("> div").css("padding","0 "+a+"px"):r.find("> div").css("padding",e+"px 0"),r.bind("stop",function(){r.data("paused",!0)}).bind("pause",function(){r.data("paused",!0)}).bind("start",function(){r.data("paused",!1)}).bind("unpause",function(){r.data("paused",!1)}).data("marqueeState",l),n.push(s),s[l.axis]=u(l.dir,s,l),r.trigger("start"),t+1==h&&p()}),c(n)}}(jQuery);