[pve-devel] [PATCH manager] disable animation of charts on load

Dominik Csapak d.csapak at proxmox.com
Thu Jun 2 15:20:43 CEST 2016


this enables the animation of the chart after it
finished loading, to avoid the initial zoom

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 www/manager6/panel/RRDChart.js | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/www/manager6/panel/RRDChart.js b/www/manager6/panel/RRDChart.js
index 69998b0..bf0dd35 100644
--- a/www/manager6/panel/RRDChart.js
+++ b/www/manager6/panel/RRDChart.js
@@ -5,6 +5,7 @@ Ext.define('PVE.widget.RRDChart', {
 
     width: 800,
     height: 300,
+    animation: false,
     interactions: [{
 	type: 'crosszoom'
     }],
@@ -179,5 +180,10 @@ Ext.define('PVE.widget.RRDChart', {
 	}
 
 	me.callParent();
+
+	// enable animation after the store ist loaded
+	me.store.onAfter('load', function(){
+	    me.setAnimation(true);
+	}, this, {single: true});
     }
 });
-- 
2.1.4




More information about the pve-devel mailing list