View2D NoConstraint methods renamed

This commit is contained in:
Éric Lemoine
2013-03-05 12:51:03 +01:00
parent 29e610b9f3
commit b884f2f25d
4 changed files with 9 additions and 8 deletions

View File

@@ -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;
};

View File

@@ -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);
}
};

View File

@@ -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);
};

View File

@@ -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();