Merge pull request #1975 from fredj/rotation-anchor

Rotate around arbitrary coordinate
This commit is contained in:
Frédéric Junod
2014-04-10 14:22:08 +02:00
8 changed files with 65 additions and 11 deletions

View File

@@ -128,11 +128,7 @@ ol.interaction.Interaction.rotateWithoutConstraints =
}
}
goog.asserts.assertInstanceof(view, ol.View2D);
if (goog.isDefAndNotNull(opt_anchor)) {
var center = view.calculateCenterRotate(rotation, opt_anchor);
view.setCenter(center);
}
view.setRotation(rotation);
view.rotate(rotation, opt_anchor);
}
};