From b884f2f25d6b8dd4ddb065a1574286bc13efd5da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Tue, 5 Mar 2013 12:51:03 +0100 Subject: [PATCH] View2D NoConstraint methods renamed --- src/ol/interaction/dragrotateinteraction.js | 2 +- src/ol/interaction/touchrotateinteraction.js | 3 ++- src/ol/interaction/touchzoominteraction.js | 2 +- src/ol/view2d.js | 10 +++++----- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/ol/interaction/dragrotateinteraction.js b/src/ol/interaction/dragrotateinteraction.js index d4036be9c1..2ad45dfa78 100644 --- a/src/ol/interaction/dragrotateinteraction.js +++ b/src/ol/interaction/dragrotateinteraction.js @@ -53,7 +53,7 @@ ol.interaction.DragRotate.prototype.handleDrag = function(mapBrowserEvent) { // FIXME supports View2D only goog.asserts.assert(view instanceof ol.View2D); map.requestRenderFrame(); - view.rotateNoConstraint(map, view.getRotation() - delta); + view.rotateWithoutConstraints(map, view.getRotation() - delta); } this.lastAngle_ = theta; }; diff --git a/src/ol/interaction/touchrotateinteraction.js b/src/ol/interaction/touchrotateinteraction.js index a3a6e14dfe..3f4abc3ce7 100644 --- a/src/ol/interaction/touchrotateinteraction.js +++ b/src/ol/interaction/touchrotateinteraction.js @@ -98,7 +98,8 @@ ol.interaction.TouchRotate.prototype.handleTouchMove = // rotate if (this.rotating_) { - view.rotateNoConstraint(map, view.getRotation() + rotationDelta, anchor); + view.rotateWithoutConstraints(map, view.getRotation() + rotationDelta, + anchor); } }; diff --git a/src/ol/interaction/touchzoominteraction.js b/src/ol/interaction/touchzoominteraction.js index 76d99bafd7..bbb0bab518 100644 --- a/src/ol/interaction/touchzoominteraction.js +++ b/src/ol/interaction/touchzoominteraction.js @@ -65,7 +65,7 @@ ol.interaction.TouchZoom.prototype.handleTouchMove = var anchor = map.getCoordinateFromPixel(centroid); // scale, bypass the resolution constraint - view.zoomNoConstraint(map, view.getResolution() * scaleDelta, anchor); + view.zoomWithoutConstraints(map, view.getResolution() * scaleDelta, anchor); }; diff --git a/src/ol/view2d.js b/src/ol/view2d.js index f022a1bf25..f472014250 100644 --- a/src/ol/view2d.js +++ b/src/ol/view2d.js @@ -264,7 +264,7 @@ goog.exportProperty( ol.View2D.prototype.rotate = function(map, rotation, opt_anchor, opt_duration) { rotation = this.constraints_.rotation(rotation, 0); - this.rotateNoConstraint(map, rotation, opt_anchor, opt_duration); + this.rotateWithoutConstraints(map, rotation, opt_anchor, opt_duration); }; @@ -274,7 +274,7 @@ ol.View2D.prototype.rotate = * @param {ol.Coordinate=} opt_anchor Anchor coordinate. * @param {number=} opt_duration Duration. */ -ol.View2D.prototype.rotateNoConstraint = +ol.View2D.prototype.rotateWithoutConstraints = function(map, rotation, opt_anchor, opt_duration) { if (goog.isDefAndNotNull(rotation)) { var currentRotation = this.getRotation(); @@ -324,7 +324,7 @@ ol.View2D.prototype.rotateNoConstraint = ol.View2D.prototype.zoom = function(map, resolution, opt_anchor, opt_duration) { resolution = this.constraints_.resolution(resolution, 0); - this.zoomNoConstraint(map, resolution, opt_anchor, opt_duration); + this.zoomWithoutConstraints(map, resolution, opt_anchor, opt_duration); }; @@ -338,7 +338,7 @@ ol.View2D.prototype.zoomByDelta = function(map, delta, opt_anchor, opt_duration) { var currentResolution = this.getResolution(); var resolution = this.constraints_.resolution(currentResolution, delta); - this.zoomNoConstraint(map, resolution, opt_anchor, opt_duration); + this.zoomWithoutConstraints(map, resolution, opt_anchor, opt_duration); }; @@ -348,7 +348,7 @@ ol.View2D.prototype.zoomByDelta = * @param {ol.Coordinate=} opt_anchor Anchor coordinate. * @param {number=} opt_duration Duration. */ -ol.View2D.prototype.zoomNoConstraint = +ol.View2D.prototype.zoomWithoutConstraints = function(map, resolution, opt_anchor, opt_duration) { if (goog.isDefAndNotNull(resolution)) { var currentResolution = this.getResolution();