X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/c930e9176a5a85509c5b0230e2bff5c22a591432..25ef3491bd9ae007ff1fc2b0d7943e6eaaccf775:/src/widgets/chart/Chart.js diff --git a/src/widgets/chart/Chart.js b/src/widgets/chart/Chart.js index 6015d367..078884dc 100644 --- a/src/widgets/chart/Chart.js +++ b/src/widgets/chart/Chart.js @@ -1,5 +1,5 @@ /*! - * Ext JS Library 3.0.0 + * Ext JS Library 3.0.3 * Copyright(c) 2006-2009 Ext JS, LLC * licensing@extjs.com * http://www.extjs.com/license @@ -143,13 +143,14 @@ */ bindStore : function(store, initial){ if(!initial && this.store){ - this.store.un("datachanged", this.refresh, this); - this.store.un("add", this.delayRefresh, this); - this.store.un("remove", this.delayRefresh, this); - this.store.un("update", this.delayRefresh, this); - this.store.un("clear", this.refresh, this); if(store !== this.store && this.store.autoDestroy){ this.store.destroy(); + }else{ + this.store.un("datachanged", this.refresh, this); + this.store.un("add", this.delayRefresh, this); + this.store.un("remove", this.delayRefresh, this); + this.store.un("update", this.delayRefresh, this); + this.store.un("clear", this.refresh, this); } } if(store){ @@ -174,7 +175,7 @@ this.swf.setType(this.type); if(this.chartStyle){ - this.setStyles(Ext.apply(this.extraStyle || {}, this.chartStyle)); + this.setStyles(Ext.apply({}, this.extraStyle, this.chartStyle)); } if(this.categoryNames){ @@ -256,7 +257,11 @@ onDestroy: function(){ Ext.chart.Chart.superclass.onDestroy.call(this); - delete window[this.tipFnName]; + this.bindStore(null); + var tip = this.tipFnName; + if(!Ext.isEmpty(tip)){ + delete window[tip]; + } } }); Ext.reg('chart', Ext.chart.Chart);