Add className option to ol.control.MousePosition

This commit is contained in:
Tom Payne
2013-05-07 16:18:05 +02:00
parent 525d5c5337
commit f31a4f8549
2 changed files with 5 additions and 1 deletions
+1
View File
@@ -137,6 +137,7 @@
/** /**
* @typedef {Object} ol.control.MousePositionOptions * @typedef {Object} ol.control.MousePositionOptions
* @property {string|undefined} className Class name.
* @property {ol.CoordinateFormatType|undefined} coordinateFormat Coordinate * @property {ol.CoordinateFormatType|undefined} coordinateFormat Coordinate
* format. * format.
* @property {ol.Map|undefined} map Map. * @property {ol.Map|undefined} map Map.
+4 -1
View File
@@ -27,8 +27,11 @@ ol.control.MousePosition = function(opt_options) {
var options = goog.isDef(opt_options) ? opt_options : {}; var options = goog.isDef(opt_options) ? opt_options : {};
var className = goog.isDef(options.className) ?
options.className : 'ol-mouseposition';
var element = goog.dom.createDom(goog.dom.TagName.DIV, { var element = goog.dom.createDom(goog.dom.TagName.DIV, {
'class': 'ol-mouseposition' 'class': className
}); });
goog.base(this, { goog.base(this, {