a:23:{s:9:"#provides";s:33:"dojox.charting.action2d.MoveSlice";s:9:"#resource";s:30:"charting/action2d/MoveSlice.js";s:9:"#requires";a:5:{i:0;a:2:{i:0;s:6:"common";i:1;s:28:"dojox.charting.action2d.Base";}i:1;a:2:{i:0;s:6:"common";i:1;s:16:"dojox.gfx.matrix";}i:2;a:2:{i:0;s:6:"common";i:1;s:21:"dojox.lang.functional";}i:3;a:2:{i:0;s:6:"common";i:1;s:26:"dojox.lang.functional.scan";}i:4;a:2:{i:0;s:6:"common";i:1;s:26:"dojox.lang.functional.fold";}}s:33:"dojox.charting.action2d.MoveSlice";a:6:{s:4:"type";s:8:"Function";s:6:"chains";a:2:{s:9:"prototype";a:1:{i:0;s:28:"dojox.charting.action2d.Base";}s:4:"call";a:1:{i:0;s:28:"dojox.charting.action2d.Base";}}s:10:"parameters";a:3:{s:5:"chart";a:1:{s:4:"type";s:0:"";}s:4:"plot";a:1:{s:4:"type";s:0:"";}s:6:"kwArgs";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:1136:"dojo.provide("dojox.charting.action2d.MoveSlice"); dojo.require("dojox.charting.action2d.Base"); dojo.require("dojox.gfx.matrix"); dojo.require("dojox.lang.functional"); dojo.require("dojox.lang.functional.scan"); dojo.require("dojox.lang.functional.fold"); (function(){ var DEFAULT_SCALE = 1.05, DEFAULT_SHIFT = 7, // px m = dojox.gfx.matrix, gf = dojox.gfx.fx, df = dojox.lang.functional; dojo.declare("dojox.charting.action2d.MoveSlice", dojox.charting.action2d.Base, { // the data description block for the widget parser defaultParams: { duration: 400, // duration of the action in ms easing: dojo.fx.easing.backOut, // easing for the action scale: DEFAULT_SCALE, // scale of magnification shift: DEFAULT_SHIFT // shift of the slice }, optionalParams: {}, // no optional parameters constructor: function(chart, plot, kwArgs){ // process optional named parameters if(!kwArgs){ kwArgs = {}; } this.scale = typeof kwArgs.scale == "number" ? kwArgs.scale : DEFAULT_SCALE; this.shift = typeof kwArgs.shift == "number" ? kwArgs.shift : DEFAULT_SHIFT; this.connect();";s:9:"classlike";b:1;s:7:"summary";s:0:"";}s:47:"dojox.charting.action2d.MoveSlice.defaultParams";a:3:{s:9:"prototype";s:33:"dojox.charting.action2d.MoveSlice";s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}s:48:"dojox.charting.action2d.MoveSlice.optionalParams";a:3:{s:9:"prototype";s:33:"dojox.charting.action2d.MoveSlice";s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}s:41:"dojox.charting.action2d.MoveSlice.process";a:5:{s:9:"prototype";s:33:"dojox.charting.action2d.MoveSlice";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:1:"o";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:1546:" if(!o.shape || o.element != "slice" || !(o.type in this.overOutEvents)){ return; } if(!this.angles){ // calculate the running total of slice angles if(typeof o.run.data[0] == "number"){ this.angles = df.map(df.scanl(o.run.data, "+", 0), "* 2 * Math.PI / this", df.foldl(o.run.data, "+", 0)); }else{ this.angles = df.map(df.scanl(o.run.data, "a + b.y", 0), "* 2 * Math.PI / this", df.foldl(o.run.data, "a + b.y", 0)); } } var index = o.index, anim, endScale, startOffset, endOffset, angle = (this.angles[index] + this.angles[index + 1]) / 2, rotateTo0 = m.rotateAt(-angle, o.cx, o.cy), rotateBack = m.rotateAt( angle, o.cx, o.cy); anim = this.anim[index]; if(anim){ anim.action.stop(true); }else{ this.anim[index] = anim = {}; } if(o.type == "onmouseover"){ startOffset = 0; endOffset = this.shift; endScale = this.scale; }else{ startOffset = this.shift; endOffset = 0; endScale = 1 / this.scale; } anim.action = dojox.gfx.fx.animateTransform({ shape: o.shape, duration: this.duration, easing: this.easing, transform: [ rotateBack, {name: "translate", start: [startOffset, 0], end: [endOffset, 0]}, {name: "scaleAt", start: [1, o.cx, o.cy], end: [endScale, o.cx, o.cy]}, rotateTo0 ] }); if(o.type == "onmouseout"){ dojo.connect(anim.action, "onEnd", this, function(){ delete this.anim[index]; }); } anim.action.play();";s:7:"summary";s:0:"";}s:39:"dojox.charting.action2d.MoveSlice.reset";a:4:{s:9:"prototype";s:33:"dojox.charting.action2d.MoveSlice";s:4:"type";s:8:"Function";s:6:"source";s:22:" delete this.angles;";s:7:"summary";s:0:"";}s:56:"dojox.charting.action2d.MoveSlice.defaultParams.duration";a:1:{s:7:"summary";s:0:"";}s:54:"dojox.charting.action2d.MoveSlice.defaultParams.easing";a:1:{s:7:"summary";s:0:"";}s:53:"dojox.charting.action2d.MoveSlice.defaultParams.scale";a:1:{s:7:"summary";s:0:"";}s:53:"dojox.charting.action2d.MoveSlice.defaultParams.shift";a:1:{s:7:"summary";s:0:"";}s:40:"dojox.charting.action2d.MoveSlice.angles";a:2:{s:8:"instance";s:33:"dojox.charting.action2d.MoveSlice";s:7:"summary";s:0:"";}s:39:"dojox.charting.action2d.MoveSlice.scale";a:2:{s:8:"instance";s:33:"dojox.charting.action2d.MoveSlice";s:7:"summary";s:0:"";}s:39:"dojox.charting.action2d.MoveSlice.shift";a:2:{s:8:"instance";s:33:"dojox.charting.action2d.MoveSlice";s:7:"summary";s:0:"";}s:13:"DEFAULT_SHIFT";a:1:{s:7:"summary";s:0:"";}s:1:"m";a:1:{s:7:"summary";s:0:"";}s:2:"gf";a:1:{s:7:"summary";s:0:"";}s:2:"df";a:1:{s:7:"summary";s:0:"";}s:6:"kwArgs";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}s:23:"dojox.charting.action2d";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}s:14:"dojox.charting";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}s:5:"dojox";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}}