dojox/charting/action2d/Shake.js

  • Provides:

    • dojox.charting.action2d.Shake
  • Requires:

    • dojox.charting.action2d.Base in common
    • dojox.gfx.matrix in common
    • dojo.fx in common in project dojo
  • dojox.charting.action2d.__ShakeCtorArgs

    • type
      Function
    • chains:
      • dojox.charting.action2d.__BaseCtorArgs: (prototype)
      • dojox.charting.action2d.__BaseCtorArgs: (call)
    • summary
      Additional arguments for highlighting actions.
  • dojox.charting.action2d.__ShakeCtorArgs.shift

    • type
      Number
    • summary
      The amount in pixels to shift the pie slice.  Default is 3.
  • dojox.charting.action2d.Shake

    • type
      Function
    • chains:
      • dojox.charting.action2d.Base: (prototype)
      • dojox.charting.action2d.Base: (call)
    • parameters:
      • chart: (typeof dojox.charting.Chart2D)
        The chart this action belongs to.
      • plot: (typeof String)
        The plot this action is attached to.  If not passed, "default" is assumed.
      • kwArgs: (typeof dojox.charting.action2d.__ShakeCtorArgs)
        Optional keyword arguments object for setting parameters.
    • source: [view]
         if(!kwArgs){ kwArgs = {}; }
         this.shiftX = typeof kwArgs.shiftX == "number" ? kwArgs.shiftX : DEFAULT_SHIFT;
         this.shiftY = typeof kwArgs.shiftY == "number" ? kwArgs.shiftY : DEFAULT_SHIFT;


         this.connect();
    • summary
      Create the shaking action and connect it to the plot.
  • dojox.charting.action2d.Shake.defaultParams

    • type
      Object
    • summary
  • dojox.charting.action2d.Shake.optionalParams

    • type
      Object
    • summary
  • dojox.charting.action2d.Shake.process

    • type
      Function
    • parameters:
      • o: (typeof dojox.gfx.Shape)
        The object on which to process the slice moving action.
    • source: [view]
         if(!o.shape || !(o.type in this.overOutEvents)){ return; }


         var runName = o.run.name, index = o.index, vector = [], anim,
          shiftX = o.type == "onmouseover" ? this.shiftX : -this.shiftX,
          shiftY = o.type == "onmouseover" ? this.shiftY : -this.shiftY;


         if(runName in this.anim){
          anim = this.anim[runName][index];
         }else{
          this.anim[runName] = {};
         }


         if(anim){
          anim.action.stop(true);
         }else{
          this.anim[runName][index] = anim = {};
         }


         var kwArgs = {
          shape: o.shape,
          duration: this.duration,
          easing: this.easing,
          transform: [
           {name: "translate", start: [this.shiftX, this.shiftY], end: [0, 0]},
           m.identity
          ]
         };
         if(o.shape){
          vector.push(gf.animateTransform(kwArgs));
         }
         if(o.oultine){
          kwArgs.shape = o.outline;
          vector.push(gf.animateTransform(kwArgs));
         }
         if(o.shadow){
          kwArgs.shape = o.shadow;
          vector.push(gf.animateTransform(kwArgs));
         }


         if(!vector.length){
          delete this.anim[runName][index];
          return;
         }


         anim.action = dojo.fx.combine(vector);
         if(o.type == "onmouseout"){
          dojo.connect(anim.action, "onEnd", this, function(){
           if(this.anim[runName]){
            delete this.anim[runName][index];
           }
          });
         }
         anim.action.play();
    • summary
      Process the action on the given object.
  • dojox.charting.action2d.Shake.defaultParams.duration

    • summary
  • dojox.charting.action2d.Shake.defaultParams.easing

    • summary
  • dojox.charting.action2d.Shake.defaultParams.shiftX

    • summary
  • dojox.charting.action2d.Shake.defaultParams.shiftY

    • summary
  • dojox.charting.action2d.Shake.shiftX

    • summary
  • dojox.charting.action2d.Shake.shiftY

    • summary
  • m

    • summary
  • gf

    • summary
  • dojox.charting.action2d

    • type
      Object
    • summary
  • dojox.charting

    • type
      Object
    • summary
  • dojox

    • type
      Object
    • summary