Merge pull request #2204 from probins/dragbox

Correct/improve dragbox docs
This commit is contained in:
Paul Spencer
2014-07-08 19:40:55 -04:00
4 changed files with 11 additions and 3 deletions

View File

@@ -69,9 +69,12 @@ goog.inherits(ol.DragBoxEvent, goog.events.Event);
/** /**
* @classdesc * @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 * 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. * This interaction is only supported for mouse devices.
* *

View File

@@ -15,7 +15,7 @@ goog.require('ol.style.Style');
* @classdesc * @classdesc
* Allows the user to zoom the map by clicking and dragging on the map, * Allows the user to zoom the map by clicking and dragging on the map,
* normally combined with an {@link ol.events.condition} that limits * 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 * @constructor
* @extends {ol.interaction.DragBox} * @extends {ol.interaction.DragBox}

View File

@@ -19,6 +19,8 @@ goog.require('ol.easing');
* For example, {@link ol.interaction.KeyboardZoom} is functionally the same as * For example, {@link ol.interaction.KeyboardZoom} is functionally the same as
* {@link ol.control.Zoom}, but triggered by a keyboard event not a button * {@link ol.control.Zoom}, but triggered by a keyboard event not a button
* element event. * element event.
* Although interactions do not have a DOM element, some of them do render
* vectors and so are visible on the screen.
* *
* @constructor * @constructor
* @extends {ol.Observable} * @extends {ol.Observable}

View File

@@ -32,6 +32,9 @@ goog.require('ol.interaction.PinchZoom');
* * {@link ol.interaction.MouseWheelZoom} * * {@link ol.interaction.MouseWheelZoom}
* * {@link ol.interaction.DragZoom} * * {@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. * @param {olx.interaction.DefaultsOptions=} opt_options Defaults options.
* @return {ol.Collection} A collection of interactions to be used with * @return {ol.Collection} A collection of interactions to be used with
* the ol.Map constructor's interactions option. * the ol.Map constructor's interactions option.