Clarifying docs and removing a bit of lint.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11020 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -43,22 +43,25 @@ OpenLayers.Handler.Box = OpenLayers.Class(OpenLayers.Handler, {
|
|||||||
*
|
*
|
||||||
* Parameters:
|
* Parameters:
|
||||||
* control - {<OpenLayers.Control>}
|
* control - {<OpenLayers.Control>}
|
||||||
* callbacks - {Object} An object containing a single function to be
|
* callbacks - {Object} An object with a "done" property whose value is a
|
||||||
* called when the drag operation is finished.
|
* callback to be called when the box drag operation is finished.
|
||||||
* The callback should expect to recieve a single
|
* The callback should expect to recieve a single argument, the box
|
||||||
* argument, the point geometry.
|
* bounds or a pixel. If the box dragging didn't span more than a 5
|
||||||
|
* pixel distance, a pixel will be returned instead of a bounds object.
|
||||||
* options - {Object}
|
* options - {Object}
|
||||||
*/
|
*/
|
||||||
initialize: function(control, callbacks, options) {
|
initialize: function(control, callbacks, options) {
|
||||||
OpenLayers.Handler.prototype.initialize.apply(this, arguments);
|
OpenLayers.Handler.prototype.initialize.apply(this, arguments);
|
||||||
var callbacks = {
|
|
||||||
"down": this.startBox,
|
|
||||||
"move": this.moveBox,
|
|
||||||
"out": this.removeBox,
|
|
||||||
"up": this.endBox
|
|
||||||
};
|
|
||||||
this.dragHandler = new OpenLayers.Handler.Drag(
|
this.dragHandler = new OpenLayers.Handler.Drag(
|
||||||
this, callbacks, {keyMask: this.keyMask});
|
this,
|
||||||
|
{
|
||||||
|
down: this.startBox,
|
||||||
|
move: this.moveBox,
|
||||||
|
out: this.removeBox,
|
||||||
|
up: this.endBox
|
||||||
|
},
|
||||||
|
{keyMask: this.keyMask}
|
||||||
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user