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
+4 -6
View File
@@ -44,13 +44,11 @@ ol.control.Rotate = function(opt_options) {
var tipLabel = goog.isDef(options.tipLabel) ?
options.tipLabel : 'Reset rotation';
var tip = goog.dom.createDom(goog.dom.TagName.SPAN, {
'role' : 'tooltip'
}, tipLabel);
var button = goog.dom.createDom(goog.dom.TagName.BUTTON, {
'class': className + '-reset ol-has-tooltip',
'type' : 'button'
}, tip, this.label_);
'class': className + '-reset',
'type' : 'button',
'title': tipLabel
}, this.label_);
var handler = new ol.pointer.PointerEventHandler(button);
this.registerDisposable(handler);