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();