From 14069a64e1ab20bc6dcf92bb25a50cb1dbec55fb Mon Sep 17 00:00:00 2001 From: Antoine Vandecreme Date: Thu, 12 May 2016 18:47:35 -0400 Subject: [PATCH] Fix applyConstraints with rotation. --- src/viewport.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/viewport.js b/src/viewport.js index ba65048b..e5c4f51a 100644 --- a/src/viewport.js +++ b/src/viewport.js @@ -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;