Add explicit text nodes to zoom in/out controls

IE < 9 does not support CSS content properties, so the +/- does not
get rendered. Instead, add the +/- as text nodes when creating the
DOM nodes for the control.
This commit is contained in:
Austin Hyde
2013-11-26 09:57:20 -05:00
parent eebf730b66
commit 1215f58241
3 changed files with 8 additions and 8 deletions

View File

@@ -32,10 +32,14 @@ ol.control.Zoom = function(opt_options) {
var delta = goog.isDef(options.delta) ? options.delta : 1;
var zoomInLabel = goog.isDef(options.zoomInLabel) ? options.zoomInLabel : '+',
zoomOutLabel =
goog.isDef(options.zoomOutLabel) ? options.zoomOutLabel : '-';
var inElement = goog.dom.createDom(goog.dom.TagName.A, {
'href': '#zoomIn',
'class': className + '-in'
});
}, zoomInLabel);
goog.events.listen(inElement, [
goog.events.EventType.TOUCHEND,
goog.events.EventType.CLICK
@@ -44,7 +48,7 @@ ol.control.Zoom = function(opt_options) {
var outElement = goog.dom.createDom(goog.dom.TagName.A, {
'href': '#zoomOut',
'class': className + '-out'
});
}, zoomOutLabel);
goog.events.listen(outElement, [
goog.events.EventType.TOUCHEND,
goog.events.EventType.CLICK