
template.js.flot.jquery.flot.resize.min.js Maven / Gradle / Ivy
(function(k,z,g){function d(){for(var l=b.length-1;l>=0;l--){var i=k(b[l]);if(i[0]==z||i.is(":visible")){var c=i.width(),f=i.height(),a=i.data(x);!a||c===a.w&&f===a.h?m[v]=m[j]:(m[v]=m[w],i.trigger(y,[a.w=c,a.h=f]))}else{a=i.data(x),a.w=0,a.h=0}}A!==null&&(A=z.requestAnimationFrame(d))}var b=[],m=k.resize=k.extend(k.resize,{}),A,e="setTimeout",y="resize",x=y+"-special-event",v="delay",j="pendingDelay",w="activeDelay",q="throttleWindow";m[j]=250,m[w]=20,m[v]=m[j],m[q]=!0,k.event.special[y]={setup:function(){if(!m[q]&&this[e]){return !1}var a=k(this);b.push(this),a.data(x,{w:a.width(),h:a.height()}),b.length===1&&(A=g,d())},teardown:function(){if(!m[q]&&this[e]){return !1}var a=k(this);for(var c=b.length-1;c>=0;c--){if(b[c]==this){b.splice(c,1);break}}a.removeData(x),b.length||(cancelAnimationFrame(A),A=null)},add:function(a){function c(n,l,p){var r=k(this),h=r.data(x);h.w=l!==g?l:r.width(),h.h=p!==g?p:r.height(),f.apply(this,arguments)}if(!m[q]&&this[e]){return !1}var f;if(k.isFunction(a)){return f=a,c}f=a.handler,a.handler=c}},z.requestAnimationFrame||(z.requestAnimationFrame=function(){return z.webkitRequestAnimationFrame||z.mozRequestAnimationFrame||z.oRequestAnimationFrame||z.msRequestAnimationFrame||function(a,c){return z.setTimeout(a,m[v])}}()),z.cancelAnimationFrame||(z.cancelAnimationFrame=function(){return z.webkitCancelRequestAnimationFrame||z.mozCancelRequestAnimationFrame||z.oCancelRequestAnimationFrame||z.msCancelRequestAnimationFrame||clearTimeout}())})(jQuery,this);(function(b){var a={};function c(f){function e(){var h=f.getPlaceholder();if(h.width()==0||h.height()==0){return}f.resize();f.setupGrid();f.draw()}function g(i,h){i.getPlaceholder().resize(e)}function d(i,h){i.getPlaceholder().unbind("resize",e)}f.hooks.bindEvents.push(g);f.hooks.shutdown.push(d)}b.plot.plugins.push({init:c,options:a,name:"resize",version:"1.0"})})(jQuery);
© 2015 - 2025 Weber Informatics LLC | Privacy Policy