Upgrade to ExtJS 3.0.3 - Released 10/11/2009
[extjs.git] / pkgs / pkg-charts-debug.js
index 020f854..e8ffae6 100644 (file)
@@ -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
  * Copyright(c) 2006-2009 Ext JS, LLC
  * licensing@extjs.com
  * http://www.extjs.com/license
@@ -805,6 +805,19 @@ Ext.FlashComponent = Ext.extend(Ext.BoxComponent, {
      * The wmode of the flash object. This can be used to control layering. Defaults to <tt>'opaque'</tt>.
      */
     wmode: 'opaque',
      * The wmode of the flash object. This can be used to control layering. Defaults to <tt>'opaque'</tt>.
      */
     wmode: 'opaque',
+    
+    /**
+     * @cfg {Object} flashVars
+     * A set of key value pairs to be passed to the flash object as flash variables. Defaults to <tt>undefined</tt>.
+     */
+    flashVars: undefined,
+    
+    /**
+     * @cfg {Object} flashParams
+     * A set of key value pairs to be passed to the flash object as parameters. Possible parameters can be found here:
+     * http://kb2.adobe.com/cps/127/tn_12701.html Defaults to <tt>undefined</tt>.
+     */
+    flashParams: undefined,
 
     /**
      * @cfg {String} url
 
     /**
      * @cfg {String} url
@@ -831,15 +844,15 @@ Ext.FlashComponent = Ext.extend(Ext.BoxComponent, {
     onRender : function(){
         Ext.FlashComponent.superclass.onRender.apply(this, arguments);
 
     onRender : function(){
         Ext.FlashComponent.superclass.onRender.apply(this, arguments);
 
-        var params = {
+        var params = Ext.apply({
             allowScriptAccess: 'always',
             bgcolor: this.backgroundColor,
             wmode: this.wmode
             allowScriptAccess: 'always',
             bgcolor: this.backgroundColor,
             wmode: this.wmode
-        }, vars = {
+        }, this.flashParams), vars = Ext.apply({
             allowedDomain: document.location.hostname,
             elementID: this.getId(),
             eventHandler: 'Ext.FlashEventProxy.onEvent'
             allowedDomain: document.location.hostname,
             elementID: this.getId(),
             eventHandler: 'Ext.FlashEventProxy.onEvent'
-        };
+        }, this.flashVars);
 
         new swfobject.embedSWF(this.url, this.id, this.swfWidth, this.swfHeight, this.flashVersion,
             this.expressInstall ? Ext.FlashComponent.EXPRESS_INSTALL_URL : undefined, vars, params);
 
         new swfobject.embedSWF(this.url, this.id, this.swfWidth, this.swfHeight, this.flashVersion,
             this.expressInstall ? Ext.FlashComponent.EXPRESS_INSTALL_URL : undefined, vars, params);
@@ -1043,13 +1056,14 @@ Ext.FlashEventProxy = {
      */\r
     bindStore : function(store, initial){\r
         if(!initial && this.store){\r
      */\r
     bindStore : function(store, initial){\r
         if(!initial && this.store){\r
-            this.store.un("datachanged", this.refresh, this);\r
-            this.store.un("add", this.delayRefresh, this);\r
-            this.store.un("remove", this.delayRefresh, this);\r
-            this.store.un("update", this.delayRefresh, this);\r
-            this.store.un("clear", this.refresh, this);\r
             if(store !== this.store && this.store.autoDestroy){\r
                 this.store.destroy();\r
             if(store !== this.store && this.store.autoDestroy){\r
                 this.store.destroy();\r
+            }else{\r
+                this.store.un("datachanged", this.refresh, this);\r
+                this.store.un("add", this.delayRefresh, this);\r
+                this.store.un("remove", this.delayRefresh, this);\r
+                this.store.un("update", this.delayRefresh, this);\r
+                this.store.un("clear", this.refresh, this);\r
             }\r
         }\r
         if(store){\r
             }\r
         }\r
         if(store){\r
@@ -1074,7 +1088,7 @@ Ext.FlashEventProxy = {
         this.swf.setType(this.type);\r
 \r
         if(this.chartStyle){\r
         this.swf.setType(this.type);\r
 \r
         if(this.chartStyle){\r
-            this.setStyles(Ext.apply(this.extraStyle || {}, this.chartStyle));\r
+            this.setStyles(Ext.apply({}, this.extraStyle, this.chartStyle));\r
         }\r
 \r
         if(this.categoryNames){\r
         }\r
 \r
         if(this.categoryNames){\r
@@ -1156,7 +1170,11 @@ Ext.FlashEventProxy = {
     \r
     onDestroy: function(){\r
         Ext.chart.Chart.superclass.onDestroy.call(this);\r
     \r
     onDestroy: function(){\r
         Ext.chart.Chart.superclass.onDestroy.call(this);\r
-        delete window[this.tipFnName];\r
+        this.bindStore(null);\r
+        var tip = this.tipFnName;\r
+        if(!Ext.isEmpty(tip)){\r
+            delete window[tip];\r
+        }\r
     }\r
 });\r
 Ext.reg('chart', Ext.chart.Chart);\r
     }\r
 });\r
 Ext.reg('chart', Ext.chart.Chart);\r