Merge all changes from the naturaldocs sandbox. This brings all the work that

has been done in the NaturalDocs branch back to trunk. Thanks to everyone who
helped out in making this happen. (I could list people, but the list would
be long, and I'm already mentally on vacation.)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@3545 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
crschmidt
2007-06-29 15:59:20 +00:00
parent f1c61fd0d6
commit 3948913bfc
107 changed files with 8658 additions and 4011 deletions

View File

@@ -4,11 +4,10 @@
/**
* Class: OpenLayers.Handler
* Base class to construct a higher-level handler for event sequences.
* Handlers are created by controls, which ultimately have the responsibility
* of making changes to the map.
*
* @class
*/
OpenLayers.Handler = OpenLayers.Class.create();
@@ -19,42 +18,44 @@ OpenLayers.Handler.MOD_ALT = 4;
OpenLayers.Handler.prototype = {
/**
* @type String
* @private
* Property: id
* *Private*. {String}
*/
id: null,
/**
* The control that initialized this handler.
* @type OpenLayers.Control
* @private
* Property: control
* *Private*. {<OpenLayers.Control>}. The control that initialized this
* handler.
*/
control: null,
/**
* @type OpenLayers.Map
* @private
* Property: map
* *Private*. {<OpenLayers.Map>}
*/
map: null,
/**
* @type integer
* Property: keyMask
* {Integer}
*/
// keyMask: OpenLayers.Handler.MOD_NONE,
keyMask: null,
/**
* @type Boolean
* @private
* Property: active
* *Private*. {Boolean}
*/
active: false,
/**
* @constructor
* Constructor: OpenLayers.Handler
* Construct a handler.
*
* @param {OpenLayers.Control} control
* @param {Object} callbacks A hash of callback functions
* @param {Object} options
* Parameters:
* control - {<OpenLayers.Control>}
* callbacks - {Object} A hash of callback functions
* options - {Object}
*/
initialize: function(control, callbacks, options) {
OpenLayers.Util.extend(this, options);
@@ -69,10 +70,16 @@ OpenLayers.Handler.prototype = {
this.id = OpenLayers.Util.createUniqueID(this.CLASS_NAME + "_");
},
/**
* Method: setMap
*/
setMap: function (map) {
this.map = map;
},
/**
* Method: checkModifiers
*/
checkModifiers: function (evt) {
if(this.keyMask == null) {
return true;
@@ -89,9 +96,11 @@ OpenLayers.Handler.prototype = {
},
/**
* Method: activate
* Turn on the handler. Returns false if the handler was already active.
*
* @type {Boolean}
*
* Return:
* {Boolean}
*/
activate: function() {
if(this.active) {
@@ -109,9 +118,10 @@ OpenLayers.Handler.prototype = {
},
/**
* Method: deactivate
* Turn off the handler. Returns false if the handler was already inactive.
*
* @type {Boolean}
* Return: {Boolean}
*/
deactivate: function() {
if(!this.active) {
@@ -129,6 +139,7 @@ OpenLayers.Handler.prototype = {
},
/**
* Method: callback
* trigger the control's named callback with the given arguments
*/
callback: function (name, args) {
@@ -138,6 +149,7 @@ OpenLayers.Handler.prototype = {
},
/**
* Method: register
* register an event on the map
*/
register: function (name, method) {
@@ -146,6 +158,7 @@ OpenLayers.Handler.prototype = {
},
/**
* Method: unregister
* unregister an event from the map
*/
unregister: function (name, method) {
@@ -153,7 +166,7 @@ OpenLayers.Handler.prototype = {
},
/**
*
* Method: destroy
*/
destroy: function () {
// eliminate circular references