Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(41)

Side by Side Diff: third_party/flot/jquery.flot.resize.min.js

Issue 1235773002: Add jquery and flot to catapult/third_party. (Closed) Base URL: git@github.com:catapult-project/catapult.git@master
Patch Set: Rebased Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/flot/jquery.flot.resize.js ('k') | third_party/flot/jquery.flot.selection.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /* Javascript plotting library for jQuery, version 0.8.3.
2
3 Copyright (c) 2007-2014 IOLA and Ole Laursen.
4 Licensed under the MIT license.
5
6 */
7 (function($,e,t){"$:nomunge";var i=[],n=$.resize=$.extend($.resize,{}),a,r=false ,s="setTimeout",u="resize",m=u+"-special-event",o="pendingDelay",l="activeDelay" ,f="throttleWindow";n[o]=200;n[l]=20;n[f]=true;$.event.special[u]={setup:functio n(){if(!n[f]&&this[s]){return false}var e=$(this);i.push(this);e.data(m,{w:e.wid th(),h:e.height()});if(i.length===1){a=t;h()}},teardown:function(){if(!n[f]&&thi s[s]){return false}var e=$(this);for(var t=i.length-1;t>=0;t--){if(i[t]==this){i .splice(t,1);break}}e.removeData(m);if(!i.length){if(r){cancelAnimationFrame(a)} else{clearTimeout(a)}a=null}},add:function(e){if(!n[f]&&this[s]){return false}va r i;function a(e,n,a){var r=$(this),s=r.data(m)||{};s.w=n!==t?n:r.width();s.h=a! ==t?a:r.height();i.apply(this,arguments)}if($.isFunction(e)){i=e;return a}else{i =e.handler;e.handler=a}}};function h(t){if(r===true){r=t||1}for(var s=i.length-1 ;s>=0;s--){var l=$(i[s]);if(l[0]==e||l.is(":visible")){var f=l.width(),c=l.heigh t(),d=l.data(m);if(d&&(f!==d.w||c!==d.h)){l.trigger(u,[d.w=f,d.h=c]);r=t||true}} else{d=l.data(m);d.w=0;d.h=0}}if(a!==null){if(r&&(t==null||t-r<1e3)){a=e.request AnimationFrame(h)}else{a=setTimeout(h,n[o]);r=false}}}if(!e.requestAnimationFram e){e.requestAnimationFrame=function(){return e.webkitRequestAnimationFrame||e.mo zRequestAnimationFrame||e.oRequestAnimationFrame||e.msRequestAnimationFrame||fun ction(t,i){return e.setTimeout(function(){t((new Date).getTime())},n[l])}}()}if( !e.cancelAnimationFrame){e.cancelAnimationFrame=function(){return e.webkitCancel RequestAnimationFrame||e.mozCancelRequestAnimationFrame||e.oCancelRequestAnimati onFrame||e.msCancelRequestAnimationFrame||clearTimeout}()}})(jQuery,this);(funct ion($){var options={};function init(plot){function onResize(){var placeholder=pl ot.getPlaceholder();if(placeholder.width()==0||placeholder.height()==0)return;pl ot.resize();plot.setupGrid();plot.draw()}function bindEvents(plot,eventHolder){p lot.getPlaceholder().resize(onResize)}function shutdown(plot,eventHolder){plot.g etPlaceholder().unbind("resize",onResize)}plot.hooks.bindEvents.push(bindEvents) ;plot.hooks.shutdown.push(shutdown)}$.plot.plugins.push({init:init,options:optio ns,name:"resize",version:"1.0"})})(jQuery);
OLDNEW
« no previous file with comments | « third_party/flot/jquery.flot.resize.js ('k') | third_party/flot/jquery.flot.selection.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698