Defines in a namespace that can be required
For consistency, all defines are in the ol namespace. If they are to be moved to another namespace, they need to be requireable.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
goog.provide('ol.interaction.DragZoom');
|
||||
|
||||
goog.require('goog.asserts');
|
||||
goog.require('ol');
|
||||
goog.require('ol.events.condition');
|
||||
goog.require('ol.extent');
|
||||
goog.require('ol.interaction.DragBox');
|
||||
@@ -9,12 +10,6 @@ goog.require('ol.style.Stroke');
|
||||
goog.require('ol.style.Style');
|
||||
|
||||
|
||||
/**
|
||||
* @define {number} Animation duration.
|
||||
*/
|
||||
ol.interaction.DRAGZOOM_ANIMATION_DURATION = 200;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Allows the user to zoom the map by clicking and dragging on the map,
|
||||
@@ -62,5 +57,5 @@ ol.interaction.DragZoom.prototype.onBoxEnd = function() {
|
||||
var center = ol.extent.getCenter(extent);
|
||||
ol.interaction.Interaction.zoom(map, view,
|
||||
view.getResolutionForExtent(extent, map.getSize()),
|
||||
center, ol.interaction.DRAGZOOM_ANIMATION_DURATION);
|
||||
center, ol.DRAGZOOM_ANIMATION_DURATION);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user