Simplify and fix View#setZoom().

This commit is contained in:
Jürg Lehni 2011-05-17 13:41:42 +01:00
parent 26269d394a
commit 2f63127b02

View file

@ -144,9 +144,7 @@ var View = this.View = Base.extend({
setZoom: function(zoom) {
// TODO: Clamp the view between 1/32 and 64, just like Illustrator?
var mx = new Matrix();
mx.scale(zoom / this._zoom, this._center);
this.transform(mx);
this.transform(new Matrix().scale(zoom / this._zoom, this.getCenter()));
this._zoom = zoom;
},