Fix applyConstraints with rotation.

This commit is contained in:
Antoine Vandecreme 2016-05-12 18:47:35 -04:00
parent 07d66ce655
commit 14069a64e1

View File

@ -584,7 +584,8 @@ $.Viewport.prototype = {
if (bounds.x !== constrainedBounds.x ||
bounds.y !== constrainedBounds.y ||
immediately) {
this.fitBounds(constrainedBounds.rotate(this.getRotation()),
this.fitBounds(
constrainedBounds.rotate(-this.getRotation()),
immediately);
}
return this;