Permalink
Browse files

Add a rotateNoConstraint View2D method

  • Loading branch information...
1 parent 2c551b0 commit 303520a5e0b89a1ece3061e03161a9c65673f3ff @elemoine elemoine committed with tschaub Mar 4, 2013
Showing with 10 additions and 0 deletions.
  1. +10 −0 src/ol/view2d.js
View
@@ -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());

0 comments on commit 303520a

Please sign in to comment.