a:19:{s:9:"#provides";s:33:"dojox.charting.action2d.Highlight";s:9:"#resource";s:30:"charting/action2d/Highlight.js";s:9:"#requires";a:2:{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:11:"dojox.color";}}s:33:"dojox.charting.action2d.Highlight";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:1451:"dojo.provide("dojox.charting.action2d.Highlight");


dojo.require("dojox.charting.action2d.Base");
dojo.require("dojox.color");


(function(){
	var DEFAULT_SATURATION  = 100,	// %
		DEFAULT_LUMINOSITY1 = 75,	// %
		DEFAULT_LUMINOSITY2 = 50,	// %


		c = dojox.color,

		
		cc = function(color){
			return function(){ return color; };
		},

		
		hl = function(color){
			var a = new c.Color(color),
				x = a.toHsl();
			if(x.s == 0){
				x.l = x.l < 50 ? 100 : 0;
			}else{
				x.s = DEFAULT_SATURATION;
				if(x.l < DEFAULT_LUMINOSITY2){
					x.l = DEFAULT_LUMINOSITY1;
				}else if(x.l > DEFAULT_LUMINOSITY1){
					x.l = DEFAULT_LUMINOSITY2;
				}else{
					x.l = x.l - DEFAULT_LUMINOSITY2 > DEFAULT_LUMINOSITY1 - x.l ?
						DEFAULT_LUMINOSITY2 : DEFAULT_LUMINOSITY1;
				}
			}
			return c.fromHsl(x);
		};

	
	dojo.declare("dojox.charting.action2d.Highlight", 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
		},
		optionalParams: {
			highlight: "red"	// name for the highlight color
								// programmatic instantiation can use functions and color objects
		},

		
		constructor: function(chart, plot, kwArgs){
			// process optional named parameters
			var a = kwArgs && kwArgs.highlight;
			this.colorFun = a ? (dojo.isFunction(a) ? a : cc(a)) : hl;

			
			this.connect();";s:9:"classlike";b:1;s:7:"summary";s:0:"";}s:47:"dojox.charting.action2d.Highlight.defaultParams";a:3:{s:9:"prototype";s:33:"dojox.charting.action2d.Highlight";s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}s:48:"dojox.charting.action2d.Highlight.optionalParams";a:3:{s:9:"prototype";s:33:"dojox.charting.action2d.Highlight";s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}s:41:"dojox.charting.action2d.Highlight.process";a:5:{s:9:"prototype";s:33:"dojox.charting.action2d.Highlight";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:1043:"			if(!o.shape || !(o.type in this.overOutEvents)){ return; }

			
			var runName = o.run.name, index = o.index, anim, startFill, endFill;

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

			
			if(anim){
				anim.action.stop(true);
			}else{
				var color = o.shape.getFill();
				if(!color || !(color instanceof dojo.Color)){
					return;
				}
				this.anim[runName][index] = anim = {
					start: color,
					end:   this.colorFun(color)
				};
			}

			
			var start = anim.start, end = anim.end;
			if(o.type == "onmouseout"){
				// swap colors
				var t = start;
				start = end;
				end = t;
			}

			
			anim.action = dojox.gfx.fx.animateFill({
				shape:    o.shape,
				duration: this.duration,
				easing:   this.easing,
				color:    {start: start, end: end}
			});
			if(o.type == "onmouseout"){
				dojo.connect(anim.action, "onEnd", this, function(){
					if(this.anim[runName]){
						delete this.anim[runName][index];
					}
				});
			}
			anim.action.play();";s:7:"summary";s:0:"";}s:56:"dojox.charting.action2d.Highlight.defaultParams.duration";a:1:{s:7:"summary";s:0:"";}s:54:"dojox.charting.action2d.Highlight.defaultParams.easing";a:1:{s:7:"summary";s:0:"";}s:58:"dojox.charting.action2d.Highlight.optionalParams.highlight";a:1:{s:7:"summary";s:0:"";}s:42:"dojox.charting.action2d.Highlight.colorFun";a:2:{s:8:"instance";s:33:"dojox.charting.action2d.Highlight";s:7:"summary";s:0:"";}s:19:"DEFAULT_LUMINOSITY1";a:1:{s:7:"summary";s:0:"";}s:19:"DEFAULT_LUMINOSITY2";a:1:{s:7:"summary";s:0:"";}s:1:"c";a:1:{s:7:"summary";s:0:"";}s:2:"cc";a:4:{s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:5:"color";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:38:"			return function(){ return color; };";s:7:"summary";s:0:"";}s:2:"hl";a:4:{s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:5:"color";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:438:"			var a = new c.Color(color),
				x = a.toHsl();
			if(x.s == 0){
				x.l = x.l < 50 ? 100 : 0;
			}else{
				x.s = DEFAULT_SATURATION;
				if(x.l < DEFAULT_LUMINOSITY2){
					x.l = DEFAULT_LUMINOSITY1;
				}else if(x.l > DEFAULT_LUMINOSITY1){
					x.l = DEFAULT_LUMINOSITY2;
				}else{
					x.l = x.l - DEFAULT_LUMINOSITY2 > DEFAULT_LUMINOSITY1 - x.l ?
						DEFAULT_LUMINOSITY2 : DEFAULT_LUMINOSITY1;
				}
			}
			return c.fromHsl(x);";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:"";}}