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
+8 -12
View File
@@ -41,13 +41,11 @@ ol.control.Zoom = function(opt_options) {
var zoomOutTipLabel = goog.isDef(options.zoomOutTipLabel) ?
options.zoomOutTipLabel : 'Zoom out';
var tTipZoomIn = goog.dom.createDom(goog.dom.TagName.SPAN, {
'role' : 'tooltip'
}, zoomInTipLabel);
var inElement = goog.dom.createDom(goog.dom.TagName.BUTTON, {
'class': className + '-in ol-has-tooltip',
'type' : 'button'
}, tTipZoomIn, zoomInLabel);
'class': className + '-in',
'type' : 'button',
'title': zoomInTipLabel
}, zoomInLabel);
var inElementHandler = new ol.pointer.PointerEventHandler(inElement);
this.registerDisposable(inElementHandler);
@@ -65,13 +63,11 @@ ol.control.Zoom = function(opt_options) {
this.blur();
}, false);
var tTipsZoomOut = goog.dom.createDom(goog.dom.TagName.SPAN, {
'role' : 'tooltip'
}, zoomOutTipLabel);
var outElement = goog.dom.createDom(goog.dom.TagName.BUTTON, {
'class': className + '-out ol-has-tooltip',
'type' : 'button'
}, tTipsZoomOut, zoomOutLabel);
'class': className + '-out',
'type' : 'button',
'title': zoomOutTipLabel
}, zoomOutLabel);
var outElementHandler = new ol.pointer.PointerEventHandler(outElement);
this.registerDisposable(outElementHandler);