Add support to set the 'title' property of a control such that it will
be displayed when hovering over the control in a control.panel via its panel_div. r=me (Closes #822) git-svn-id: http://svn.openlayers.org/trunk/openlayers@5910 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -84,6 +84,13 @@ OpenLayers.Control = OpenLayers.Class({
|
||||
* Control.
|
||||
*/
|
||||
displayClass: "",
|
||||
|
||||
/**
|
||||
* Property: title
|
||||
* {string} This property is used for showing a tooltip over the
|
||||
* Control.
|
||||
*/
|
||||
title: "",
|
||||
|
||||
/**
|
||||
* Property: active
|
||||
@@ -172,6 +179,9 @@ OpenLayers.Control = OpenLayers.Class({
|
||||
if (this.div == null) {
|
||||
this.div = OpenLayers.Util.createDiv(this.id);
|
||||
this.div.className = this.displayClass;
|
||||
if (this.title != "") {
|
||||
this.div.title = this.title;
|
||||
}
|
||||
}
|
||||
if (px != null) {
|
||||
this.position = px.clone();
|
||||
|
||||
Reference in New Issue
Block a user