Merge pull request #2204 from probins/dragbox
Correct/improve dragbox docs
This commit is contained in:
@@ -69,9 +69,12 @@ goog.inherits(ol.DragBoxEvent, goog.events.Event);
|
||||
|
||||
/**
|
||||
* @classdesc
|
||||
* Allows the user to zoom the map by clicking and dragging on the map,
|
||||
* Allows the user to draw a vector box by clicking and dragging on the map,
|
||||
* normally combined with an {@link ol.events.condition} that limits
|
||||
* it to when the shift key is held down.
|
||||
* it to when the shift or other key is held down. This is used, for example,
|
||||
* for zooming to a specific area of the map
|
||||
* (see {@link ol.interaction.DragZoom} and
|
||||
* {@link ol.interaction.DragRotateAndZoom}).
|
||||
*
|
||||
* This interaction is only supported for mouse devices.
|
||||
*
|
||||
|
||||
@@ -15,7 +15,7 @@ goog.require('ol.style.Style');
|
||||
* @classdesc
|
||||
* Allows the user to zoom the map by clicking and dragging on the map,
|
||||
* normally combined with an {@link ol.events.condition} that limits
|
||||
* it to when the shift key is held down.
|
||||
* it to when a key, shift by default, is held down.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {ol.interaction.DragBox}
|
||||
|
||||
@@ -19,6 +19,8 @@ goog.require('ol.easing');
|
||||
* For example, {@link ol.interaction.KeyboardZoom} is functionally the same as
|
||||
* {@link ol.control.Zoom}, but triggered by a keyboard event not a button
|
||||
* element event.
|
||||
* Although interactions do not have a DOM element, some of them do render
|
||||
* vectors and so are visible on the screen.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {ol.Observable}
|
||||
|
||||
@@ -32,6 +32,9 @@ goog.require('ol.interaction.PinchZoom');
|
||||
* * {@link ol.interaction.MouseWheelZoom}
|
||||
* * {@link ol.interaction.DragZoom}
|
||||
*
|
||||
* Note that DragZoom renders a box as a vector polygon, so this interaction
|
||||
* should be excluded if you want a build with no vector support.
|
||||
*
|
||||
* @param {olx.interaction.DefaultsOptions=} opt_options Defaults options.
|
||||
* @return {ol.Collection} A collection of interactions to be used with
|
||||
* the ol.Map constructor's interactions option.
|
||||
|
||||
Reference in New Issue
Block a user