Use a standard title attribute for the control buttons

This commit is contained in:
Frederic Junod
2014-10-01 17:25:06 +02:00
parent abb86e16f0
commit 9ebde652dc
7 changed files with 22 additions and 107 deletions

View File

@@ -57,9 +57,6 @@ ol.control.OverviewMap = function(opt_options) {
var tipLabel = goog.isDef(options.tipLabel) ?
options.tipLabel : 'Overview map';
var tip = goog.dom.createDom(goog.dom.TagName.SPAN, {
'role' : 'tooltip'
}, tipLabel);
/**
* @private
@@ -83,10 +80,9 @@ ol.control.OverviewMap = function(opt_options) {
*/
this.labelSpan_ = label;
var button = goog.dom.createDom(goog.dom.TagName.BUTTON, {
'class': 'ol-has-tooltip',
'type': 'button'
'type': 'button',
'title': tipLabel
}, this.labelSpan_);
goog.dom.appendChild(button, tip);
var buttonHandler = new ol.pointer.PointerEventHandler(button);
this.registerDisposable(buttonHandler);