Adding back events documentation.

When the list of event types became unconstrained in 501b42228a, we lost the documentation for events that are triggered.  This change adds the list of events triggered to the API docs for events properties.
This commit is contained in:
tschaub
2012-02-16 10:36:34 -07:00
parent ed502f6f19
commit 2b5ade2dde
17 changed files with 218 additions and 143 deletions

View File

@@ -31,8 +31,17 @@ OpenLayers.Control.DrawFeature = OpenLayers.Class(OpenLayers.Control, {
*/
callbacks: null,
/**
* Supported event types:
/**
* APIProperty: events
* {<OpenLayers.Events>} Events instance for listeners and triggering
* control specific events.
*
* Register a listener for a particular event with the following syntax:
* (code)
* control.events.register(type, obj, listener);
* (end)
*
* Supported event types (in addition to those from <OpenLayers.Control.events>):
* featureadded - Triggered when a feature is added
*/

View File

@@ -22,15 +22,24 @@
*/
OpenLayers.Control.Geolocate = OpenLayers.Class(OpenLayers.Control, {
/**
* Supported event types:
* - *locationupdated* Triggered when browser return a new position. Listeners will
* receive an object with a 'position' property which is the browser.geolocation.position
* native object, as well as a 'point' property which is the location transformed in the
* current map projection.
* - *locationfailed* Triggered when geolocation has failed
* - *locationuncapable* Triggered when control is activated on a browser
* which doesn't support geolocation
/**
* APIProperty: events
* {<OpenLayers.Events>} Events instance for listeners and triggering
* control specific events.
*
* Register a listener for a particular event with the following syntax:
* (code)
* control.events.register(type, obj, listener);
* (end)
*
* Supported event types (in addition to those from <OpenLayers.Control.events>):
* locationupdated - Triggered when browser return a new position. Listeners will
* receive an object with a 'position' property which is the browser.geolocation.position
* native object, as well as a 'point' property which is the location transformed in the
* current map projection.
* locationfailed - Triggered when geolocation has failed
* locationuncapable - Triggered when control is activated on a browser
* which doesn't support geolocation
*/
/**

View File

@@ -169,8 +169,17 @@ OpenLayers.Control.GetFeature = OpenLayers.Class(OpenLayers.Control, {
*/
filterType: OpenLayers.Filter.Spatial.BBOX,
/**
* Supported event types:
/**
* APIProperty: events
* {<OpenLayers.Events>} Events instance for listeners and triggering
* control specific events.
*
* Register a listener for a particular event with the following syntax:
* (code)
* control.events.register(type, obj, listener);
* (end)
*
* Supported event types (in addition to those from <OpenLayers.Control.events>):
* beforefeatureselected - Triggered when <click> is true before a
* feature is selected. The event object has a feature property with
* the feature about to select

View File

@@ -17,16 +17,17 @@
*/
OpenLayers.Control.Measure = OpenLayers.Class(OpenLayers.Control, {
/**
/**
* APIProperty: events
* {<OpenLayers.Events>} Events instance for listeners and triggering
* control specific events.
*
* Register a listener for a particular event with the following syntax:
* (code)
* control.events.register(type, obj, listener);
* (end)
*
* Listeners will be called with a reference to an event object. The
* properties of this event depends on exactly what happened.
*
* Supported control event types (in addition to those from <OpenLayers.Control>):
* Supported event types (in addition to those from <OpenLayers.Control.events>):
* measure - Triggered when a measurement sketch is complete. Listeners
* will receive an event with measure, units, order, and geometry
* properties.

View File

@@ -23,17 +23,17 @@
*/
OpenLayers.Control.SLDSelect = OpenLayers.Class(OpenLayers.Control, {
/**
/**
* APIProperty: events
* {<OpenLayers.Events>} Events instance for listeners and triggering
* control specific events.
*
* Register a listener for a particular event with the following syntax:
* (code)
* control.events.register(type, obj, listener);
* (end)
*
* Listeners will be called with a reference to an event object. The
* properties of this event depends on exactly what happened.
*
* Supported control event types (in addition to those from
* <OpenLayers.Control>):
* Supported event types (in addition to those from <OpenLayers.Control.events>):
* selected - Triggered when a selection occurs. Listeners receive an
* event with *filters* and *layer* properties. Filters will be an
* array of OpenLayers.Filter objects created in order to perform

View File

@@ -21,13 +21,22 @@
*/
OpenLayers.Control.SelectFeature = OpenLayers.Class(OpenLayers.Control, {
/**
* Supported event types:
* - *beforefeaturehighlighted* Triggered before a feature is highlighted
* - *featurehighlighted* Triggered when a feature is highlighted
* - *featureunhighlighted* Triggered when a feature is unhighlighted
* - *boxselectionstart* Triggered before box selection starts
* - *boxselectionend* Triggered after box selection ends
/**
* APIProperty: events
* {<OpenLayers.Events>} Events instance for listeners and triggering
* control specific events.
*
* Register a listener for a particular event with the following syntax:
* (code)
* control.events.register(type, obj, listener);
* (end)
*
* Supported event types (in addition to those from <OpenLayers.Control.events>):
* beforefeaturehighlighted - Triggered before a feature is highlighted
* featurehighlighted - Triggered when a feature is highlighted
* featureunhighlighted - Triggered when a feature is unhighlighted
* boxselectionstart - Triggered before box selection starts
* boxselectionend - Triggered after box selection ends
*/
/**

View File

@@ -17,16 +17,17 @@
*/
OpenLayers.Control.Snapping = OpenLayers.Class(OpenLayers.Control, {
/**
/**
* APIProperty: events
* {<OpenLayers.Events>} Events instance for listeners and triggering
* control specific events.
*
* Register a listener for a particular event with the following syntax:
* (code)
* control.events.register(type, obj, listener);
* (end)
*
* Listeners will be called with a reference to an event object. The
* properties of this event depends on exactly what happened.
*
* Supported control event types (in addition to those from <OpenLayers.Control>):
* Supported event types (in addition to those from <OpenLayers.Control.events>):
* beforesnap - Triggered before a snap occurs. Listeners receive an
* event object with *point*, *x*, *y*, *distance*, *layer*, and
* *snapType* properties. The point property will be original point

View File

@@ -18,16 +18,17 @@
*/
OpenLayers.Control.Split = OpenLayers.Class(OpenLayers.Control, {
/**
/**
* APIProperty: events
* {<OpenLayers.Events>} Events instance for listeners and triggering
* control specific events.
*
* Register a listener for a particular event with the following syntax:
* (code)
* control.events.register(type, obj, listener);
* (end)
*
* Listeners will be called with a reference to an event object. The
* properties of this event depends on exactly what happened.
*
* Supported control event types (in addition to those from <OpenLayers.Control>):
* Supported event types (in addition to those from <OpenLayers.Control.events>):
* beforesplit - Triggered before a split occurs. Listeners receive an
* event object with *source* and *target* properties.
* split - Triggered when a split occurs. Listeners receive an event with

View File

@@ -21,33 +21,42 @@
*/
OpenLayers.Control.TransformFeature = OpenLayers.Class(OpenLayers.Control, {
/**
* Supported event types:
* - *beforesetfeature* Triggered before a feature is set for
* tranformation. The feature will not be set if a listener returns
* false. Listeners receive a *feature* property, with the feature
* that will be set for transformation. Listeners are allowed to
* set the control's *scale*, *ratio* and *rotation* properties,
* which will set the initial scale, ratio and rotation of the
* feature, like the <setFeature> method's initialParams argument.
* - *setfeature* Triggered when a feature is set for tranformation.
* Listeners receive a *feature* property, with the feature that
* is now set for transformation.
* - *beforetransform* Triggered while dragging, before a feature is
* transformed. The feature will not be transformed if a listener
* returns false (but the box still will). Listeners receive one or
* more of *center*, *scale*, *ratio* and *rotation*. The *center*
* property is an <OpenLayers.Geometry.Point> object with the new
* center of the transformed feature, the others are Floats with the
* scale, ratio or rotation change since the last transformation.
* - *transform* Triggered while dragging, when a feature is transformed.
* Listeners receive an event object with one or more of *center*,
* *scale*, *ratio* and *rotation*. The *center* property is an
* <OpenLayers.Geometry.Point> object with the new center of the
* transformed feature, the others are Floats with the scale, ratio
* or rotation change of the feature since the last transformation.
* - *transformcomplete* Triggered after dragging. Listeners receive
* an event object with the transformed *feature*.
/**
* APIProperty: events
* {<OpenLayers.Events>} Events instance for listeners and triggering
* control specific events.
*
* Register a listener for a particular event with the following syntax:
* (code)
* control.events.register(type, obj, listener);
* (end)
*
* Supported event types (in addition to those from <OpenLayers.Control.events>):
* beforesetfeature - Triggered before a feature is set for
* tranformation. The feature will not be set if a listener returns
* false. Listeners receive a *feature* property, with the feature
* that will be set for transformation. Listeners are allowed to
* set the control's *scale*, *ratio* and *rotation* properties,
* which will set the initial scale, ratio and rotation of the
* feature, like the <setFeature> method's initialParams argument.
* setfeature - Triggered when a feature is set for tranformation.
* Listeners receive a *feature* property, with the feature that
* is now set for transformation.
* beforetransform - Triggered while dragging, before a feature is
* transformed. The feature will not be transformed if a listener
* returns false (but the box still will). Listeners receive one or
* more of *center*, *scale*, *ratio* and *rotation*. The *center*
* property is an <OpenLayers.Geometry.Point> object with the new
* center of the transformed feature, the others are Floats with the
* scale, ratio or rotation change since the last transformation.
* transform - Triggered while dragging, when a feature is transformed.
* Listeners receive an event object with one or more of *center*,
* scale*, *ratio* and *rotation*. The *center* property is an
* <OpenLayers.Geometry.Point> object with the new center of the
* transformed feature, the others are Floats with the scale, ratio
* or rotation change of the feature since the last transformation.
* transformcomplete - Triggered after dragging. Listeners receive
* an event object with the transformed *feature*.
*/
/**

View File

@@ -154,8 +154,17 @@ OpenLayers.Control.WMSGetFeatureInfo = OpenLayers.Class(OpenLayers.Control, {
*/
hoverRequest: null,
/**
* Supported event types (in addition to those from <OpenLayers.Control>):
/**
* APIProperty: events
* {<OpenLayers.Events>} Events instance for listeners and triggering
* control specific events.
*
* Register a listener for a particular event with the following syntax:
* (code)
* control.events.register(type, obj, listener);
* (end)
*
* Supported event types (in addition to those from <OpenLayers.Control.events>):
* beforegetfeatureinfo - Triggered before the request is sent.
* The event object has an *xy* property with the position of the
* mouse click or hover event that triggers the request.

View File

@@ -135,8 +135,17 @@ OpenLayers.Control.WMTSGetFeatureInfo = OpenLayers.Class(OpenLayers.Control, {
*/
hoverRequest: null,
/**
* Supported event types (in addition to those from <OpenLayers.Control>):
/**
* APIProperty: events
* {<OpenLayers.Events>} Events instance for listeners and triggering
* control specific events.
*
* Register a listener for a particular event with the following syntax:
* (code)
* control.events.register(type, obj, listener);
* (end)
*
* Supported event types (in addition to those from <OpenLayers.Control.events>):
* beforegetfeatureinfo - Triggered before each request is sent.
* The event object has an *xy* property with the position of the
* mouse click or hover event that triggers the request and a *layer*