source: [view]
var anim = dojox.gfx.fx.animateTransform({
duration: 1000,
shape: this.mapObj,
transform: [{
name: "translate",
start: [-this.mapObj.currentBBox.x, -this.mapObj.currentBBox.y],
end: [-this._bbox.x, -this._bbox.y]
},{
name: "scaleAt",
start: [this.mapObj.currentScale, this.mapObj.currentBBox.x, this.mapObj.currentBBox.y],
end: [this._scale, this._bbox.x, this._bbox.y]
}]
});
dojo.connect(anim,"onEnd",this,function(){
this._setStrokeWith({color:"black",width:this._normalizeStrokeWeight(2)});
this.parent.onZoomEnd(this);
});
anim.play();
this.mapObj.currentScale = this._scale;
this.mapObj.currentBBox = {
x: this._bbox.x,
y: this._bbox.y
};
this._isZoomIn = true;
dojo.byId("mapZoomCursor").className = "";