X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/7a654f8d43fdb43d78b63d90528bed6e86b608cc..refs/heads/master:/docs/source/Highlight.html diff --git a/docs/source/Highlight.html b/docs/source/Highlight.html index 67b8fe94..e703e64a 100644 --- a/docs/source/Highlight.html +++ b/docs/source/Highlight.html @@ -1,6 +1,23 @@ -Sencha Documentation Project
/**
+
+
+
+  
+  The source code
+  
+  
+  
+  
+
+
+  
/**
  * @class Ext.chart.Highlight
- * @ignore
+ * A mixin providing highlight functionality for Ext.chart.series.Series.
  */
 Ext.define('Ext.chart.Highlight', {
 
@@ -10,9 +27,9 @@ Ext.define('Ext.chart.Highlight', {
 
     /* End Definitions */
 
-    /**
+    /**
      * Highlight the given series item.
-     * @param {Boolean|Object} Default's false. Can also be an object width style properties (i.e fill, stroke, radius) 
+     * @param {Boolean/Object} Default's false. Can also be an object width style properties (i.e fill, stroke, radius) 
      * or just use default styles per series by setting highlight = true.
      */
     highlight: false,
@@ -35,7 +52,7 @@ Ext.define('Ext.chart.Highlight', {
         }
     },
 
-    /**
+    /**
      * Highlight the given series item.
      * @param {Object} item Info about the item; same format as returned by #getItemForPoint.
      */
@@ -49,10 +66,7 @@ Ext.define('Ext.chart.Highlight', {
             opts = me.highlightCfg,
             surface = me.chart.surface,
             animate = me.chart.animate,
-            p,
-            from,
-            to,
-            pi;
+            p, from, to, pi;
 
         if (!me.highlight || !sprite || sprite._highlighted) {
             return;
@@ -62,8 +76,7 @@ Ext.define('Ext.chart.Highlight', {
         }
         sprite._highlighted = true;
         if (!sprite._defaults) {
-            sprite._defaults = Ext.apply(sprite._defaults || {},
-            sprite.attr);
+            sprite._defaults = Ext.apply({}, sprite.attr);
             from = {};
             to = {};
             for (p in opts) {
@@ -93,6 +106,7 @@ Ext.define('Ext.chart.Highlight', {
             }
             sprite._from = from;
             sprite._to = to;
+            sprite._endStyle = to;
         }
         if (animate) {
             sprite._anim = Ext.create('Ext.fx.Anim', {
@@ -106,7 +120,7 @@ Ext.define('Ext.chart.Highlight', {
         }
     },
 
-    /**
+    /**
      * Un-highlight any existing highlights
      */
     unHighlightItem: function() {
@@ -120,9 +134,7 @@ Ext.define('Ext.chart.Highlight', {
             opts = me.highlightCfg,
             animate = me.chart.animate,
             i = 0,
-            obj,
-            p,
-            sprite;
+            obj, p, sprite;
 
         for (; i < len; i++) {
             if (!items[i]) {
@@ -144,6 +156,8 @@ Ext.define('Ext.chart.Highlight', {
                     }
                 }
                 if (animate) {
+                    //sprite._to = obj;
+                    sprite._endStyle = obj;
                     sprite._anim = Ext.create('Ext.fx.Anim', {
                         target: sprite,
                         to: obj,
@@ -177,4 +191,6 @@ Ext.define('Ext.chart.Highlight', {
             }
         }
     }
-});
\ No newline at end of file +});
+ +