mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-03-13 16:33:28 -04:00
Simplify and fix View#setZoom().
This commit is contained in:
parent
26269d394a
commit
2f63127b02
1 changed files with 1 additions and 3 deletions
|
@ -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;
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue