From 303520a5e0b89a1ece3061e03161a9c65673f3ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Mon, 4 Mar 2013 18:07:45 +0100 Subject: [PATCH] Add a rotateNoConstraint View2D method --- src/ol/view2d.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/ol/view2d.js b/src/ol/view2d.js index 0f3d3474c9..8772f363ca 100644 --- a/src/ol/view2d.js +++ b/src/ol/view2d.js @@ -262,6 +262,16 @@ goog.exportProperty( */ ol.View2D.prototype.rotate = function(map, rotation, opt_anchor) { rotation = this.constraints_.rotation(rotation, 0); + this.rotateNoConstraint(map, rotation, opt_anchor); +}; + + +/** + * @param {ol.Map} map Map. + * @param {number|undefined} rotation Rotation. + * @param {ol.Coordinate=} opt_anchor Anchor coordinate. + */ +ol.View2D.prototype.rotateNoConstraint = function(map, rotation, opt_anchor) { if (goog.isDefAndNotNull(opt_anchor)) { var anchor = opt_anchor; var oldCenter = /** @type {!ol.Coordinate} */ (this.getCenter());