Rename olx.View2DState to olx.ViewState and use viewState property

This commit is contained in:
Tim Schaub
2014-06-26 16:38:11 -04:00
parent 2e88f911dd
commit b9f444a008
27 changed files with 146 additions and 146 deletions
+3 -3
View File
@@ -71,8 +71,8 @@ ol.interaction.KeyboardPan.prototype.handleMapBrowserEvent =
var map = mapBrowserEvent.map;
var view = map.getView();
goog.asserts.assert(goog.isDef(view));
var view2DState = view.getState();
var mapUnitsDelta = view2DState.resolution * this.pixelDelta_;
var viewState = view.getState();
var mapUnitsDelta = viewState.resolution * this.pixelDelta_;
var deltaX = 0, deltaY = 0;
if (keyCode == goog.events.KeyCodes.DOWN) {
deltaY = -mapUnitsDelta;
@@ -84,7 +84,7 @@ ol.interaction.KeyboardPan.prototype.handleMapBrowserEvent =
deltaY = mapUnitsDelta;
}
var delta = [deltaX, deltaY];
ol.coordinate.rotate(delta, view2DState.rotation);
ol.coordinate.rotate(delta, viewState.rotation);
ol.interaction.Interaction.pan(
map, view, delta, ol.KEYBOARD_PAN_DURATION);
mapBrowserEvent.preventDefault();