diff --git a/lib/OpenLayers/Control/MouseDefaults.js b/lib/OpenLayers/Control/MouseDefaults.js index 3ae7edd5d4..613bd5a520 100644 --- a/lib/OpenLayers/Control/MouseDefaults.js +++ b/lib/OpenLayers/Control/MouseDefaults.js @@ -1,17 +1,29 @@ /* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. * See http://svn.openlayers.org/trunk/openlayers/license.txt for the full * text of the license. */ + // @require: OpenLayers/Control.js + +/** + * @class + */ OpenLayers.Control.MouseDefaults = Class.create(); OpenLayers.Control.MouseDefaults.prototype = Object.extend( new OpenLayers.Control(), { + /** @type Boolean */ performedDrag: false, + /** + * @constructor + */ initialize: function() { OpenLayers.Control.prototype.initialize.apply(this, arguments); }, - + + /** + * + */ draw: function() { this.map.events.register( "click", this, this.defaultClick ); this.map.events.register( "dblclick", this, this.defaultDblClick ); @@ -21,6 +33,11 @@ OpenLayers.Control.MouseDefaults.prototype = this.map.events.register( "mouseout", this, this.defaultMouseOut ); }, + /** + * @param {Event} evt + * + * @type Boolean + */ defaultClick: function (evt) { if (!Event.isLeftClick(evt)) return; var notAfterDrag = !this.performedDrag; @@ -120,6 +137,9 @@ OpenLayers.Control.MouseDefaults.prototype = this.map.div.style.cursor = "default"; }, + /** + * @param {Event} evt + */ defaultMouseOut: function (evt) { if (this.mouseDragStart != null && OpenLayers.Util.mouseLeft(evt, this.map.div)) {