From c1c98b45b957ee52f322d3209ad58645f18dbdab Mon Sep 17 00:00:00 2001 From: Peter Robins Date: Sun, 15 Jun 2014 10:13:15 -0400 Subject: [PATCH] Correct/improve dragbox docs --- src/ol/interaction/dragboxinteraction.js | 7 +++++-- src/ol/interaction/dragzoominteraction.js | 2 +- src/ol/interaction/interaction.js | 2 ++ src/ol/interaction/interactiondefaults.js | 3 +++ 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/ol/interaction/dragboxinteraction.js b/src/ol/interaction/dragboxinteraction.js index cea9b873e4..a54636e39e 100644 --- a/src/ol/interaction/dragboxinteraction.js +++ b/src/ol/interaction/dragboxinteraction.js @@ -71,9 +71,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. * diff --git a/src/ol/interaction/dragzoominteraction.js b/src/ol/interaction/dragzoominteraction.js index 4398d4f233..cc924fcbc9 100644 --- a/src/ol/interaction/dragzoominteraction.js +++ b/src/ol/interaction/dragzoominteraction.js @@ -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} diff --git a/src/ol/interaction/interaction.js b/src/ol/interaction/interaction.js index e028bae89c..10e20ff6e0 100644 --- a/src/ol/interaction/interaction.js +++ b/src/ol/interaction/interaction.js @@ -20,6 +20,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} diff --git a/src/ol/interaction/interactiondefaults.js b/src/ol/interaction/interactiondefaults.js index 72a0b148b7..5334d08671 100644 --- a/src/ol/interaction/interactiondefaults.js +++ b/src/ol/interaction/interactiondefaults.js @@ -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.