Revert r6710: The new popup coe is going to need to change tests, so this

needs to wait.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@6711 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
crschmidt
2008-03-31 02:12:03 +00:00
parent 02bbd43687
commit 69ca5c7fdd
118 changed files with 20 additions and 1 deletions

View File

@@ -78,6 +78,15 @@ OpenLayers.Control = OpenLayers.Class({
*/
type: null,
/**
* Property: allowSelection
* {Boolean} By deafault, controls do not allow selection, because
* it may interfere with map dragging. If this is true, OpenLayers
* will not prevent selection of the control.
* Default is false.
*/
allowSelection: false,
/**
* Property: displayClass
* {string} This property is used for CSS related to the drawing of the
@@ -240,6 +249,11 @@ OpenLayers.Control = OpenLayers.Class({
if (this.div == null) {
this.div = OpenLayers.Util.createDiv(this.id);
this.div.className = this.displayClass;
if (!this.allowSelection) {
this.div.className += " olControlNoSelect";
this.div.setAttribute("unselectable", "on", 0);
this.div.onselectstart = function() { return(false); };
}
if (this.title != "") {
this.div.title = this.title;
}