Port interactions to new extents

This commit is contained in:
Tom Payne
2013-04-16 16:26:28 +02:00
parent 1d4eaf6824
commit a413f3046a

View File

@@ -4,10 +4,10 @@
goog.provide('ol.interaction.DragZoom'); goog.provide('ol.interaction.DragZoom');
goog.require('goog.asserts'); goog.require('goog.asserts');
goog.require('ol.Extent');
goog.require('ol.Size'); goog.require('ol.Size');
goog.require('ol.View2D'); goog.require('ol.View2D');
goog.require('ol.control.DragBox'); goog.require('ol.control.DragBox');
goog.require('ol.extent');
goog.require('ol.interaction.ConditionType'); goog.require('ol.interaction.ConditionType');
goog.require('ol.interaction.Drag'); goog.require('ol.interaction.Drag');
@@ -63,9 +63,8 @@ ol.interaction.DragZoom.prototype.handleDragEnd =
if (this.deltaX * this.deltaX + this.deltaY * this.deltaY >= if (this.deltaX * this.deltaX + this.deltaY * this.deltaY >=
ol.SHIFT_DRAG_ZOOM_HYSTERESIS_PIXELS_SQUARED) { ol.SHIFT_DRAG_ZOOM_HYSTERESIS_PIXELS_SQUARED) {
var map = mapBrowserEvent.map; var map = mapBrowserEvent.map;
var extent = ol.Extent.boundingExtent( var extent = ol.extent.boundingExtent(
this.startCoordinate, [this.startCoordinate, mapBrowserEvent.getCoordinate()]);
mapBrowserEvent.getCoordinate());
map.withFrozenRendering(function() { map.withFrozenRendering(function() {
// FIXME works for View2D only // FIXME works for View2D only
var view = map.getView(); var view = map.getView();