Sha256: de4fbdada62780d9af02bc476d8c8b14d48221956bc0d8500822fbd46c5e7825

Contents?: true

Size: 1.73 KB

Versions: 24

Compression:

Stored size: 1.73 KB

Contents

/*
Flot plugin for automatically redrawing plots when the placeholder
size changes, e.g. on window resizes.

It works by listening for changes on the placeholder div (through the
jQuery resize event plugin) - if the size changes, it will redraw the
plot.

There are no options. If you need to disable the plugin for some
plots, you can just fix the size of their placeholders.
*//* Inline dependency: 
 * jQuery resize event - v1.1 - 3/14/2010
 * http://benalman.com/projects/jquery-resize-plugin/
 * 
 * Copyright (c) 2010 "Cowboy" Ben Alman
 * Dual licensed under the MIT and GPL licenses.
 * http://benalman.com/about/license/
 */(function(e,t,n){function c(){s=t[o](function(){r.each(function(){var t=e(this),n=t.width(),r=t.height(),i=e.data(this,a);(n!==i.w||r!==i.h)&&t.trigger(u,[i.w=n,i.h=r])});c()},i[f])}var r=e([]),i=e.resize=e.extend(e.resize,{}),s,o="setTimeout",u="resize",a=u+"-special-event",f="delay",l="throttleWindow";i[f]=250;i[l]=!0;e.event.special[u]={setup:function(){if(!i[l]&&this[o])return!1;var t=e(this);r=r.add(t);e.data(this,a,{w:t.width(),h:t.height()});r.length===1&&c()},teardown:function(){if(!i[l]&&this[o])return!1;var t=e(this);r=r.not(t);t.removeData(a);r.length||clearTimeout(s)},add:function(t){function s(t,i,s){var o=e(this),u=e.data(this,a);u.w=i!==n?i:o.width();u.h=s!==n?s:o.height();r.apply(this,arguments)}if(!i[l]&&this[o])return!1;var r;if(e.isFunction(t)){r=t;return s}r=t.handler;t.handler=s}}})(jQuery,this);(function(e){function r(n){function r(n,r){function i(){var r=n.getPlaceholder();if(r.width()==0||r.height()==0)return;++t;e.plot(r,n.getData(),n.getOptions());--t}t||n.getPlaceholder().resize(i)}n.hooks.bindEvents.push(r)}var t=0,n={};e.plot.plugins.push({init:r,options:n,name:"resize",version:"1.0"})})(jQuery);

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
my_admin-0.1.13 app/assets/javascripts/my_admin/plugins/flot/jquery.flot.resize.min.js
my_admin-0.1.12 app/assets/javascripts/my_admin/plugins/flot/jquery.flot.resize.min.js
my_admin-0.1.11 app/assets/javascripts/my_admin/plugins/flot/jquery.flot.resize.min.js
my_admin-0.1.10 app/assets/javascripts/my_admin/plugins/flot/jquery.flot.resize.min.js
my_admin-0.1.9 app/assets/javascripts/my_admin/plugins/flot/jquery.flot.resize.min.js
my_admin-0.1.8 app/assets/javascripts/my_admin/plugins/flot/jquery.flot.resize.min.js
my_admin-0.1.7 app/assets/javascripts/my_admin/plugins/flot/jquery.flot.resize.min.js
my_admin-0.1.6 app/assets/javascripts/my_admin/plugins/flot/jquery.flot.resize.min.js
my_admin-0.1.5 app/assets/javascripts/my_admin/plugins/flot/jquery.flot.resize.min.js
my_admin-0.1.4 app/assets/javascripts/my_admin/plugins/flot/jquery.flot.resize.min.js
my_admin-0.1.3 app/assets/javascripts/my_admin/plugins/flot/jquery.flot.resize.min.js
my_admin-0.1.2 app/assets/javascripts/my_admin/plugins/flot/jquery.flot.resize.min.js
my_admin-0.1.1 app/assets/javascripts/my_admin/plugins/flot/jquery.flot.resize.min.js
my_admin-0.0.12 app/assets/javascripts/my_admin/plugins/flot/jquery.flot.resize.min.js
my_admin-0.0.11 app/assets/javascripts/my_admin/plugins/flot/jquery.flot.resize.min.js
my_admin-0.0.10 app/assets/javascripts/my_admin/plugins/flot/jquery.flot.resize.min.js
my_admin-0.0.9 app/assets/javascripts/my_admin/plugins/flot/jquery.flot.resize.min.js
my_admin-0.0.8 app/assets/javascripts/my_admin/plugins/flot/jquery.flot.resize.min.js
my_admin-0.0.7 app/assets/javascripts/my_admin/plugins/flot/jquery.flot.resize.min.js
my_admin-0.0.6 app/assets/javascripts/my_admin/plugins/flot/jquery.flot.resize.min.js