Add className option to ol.control.MousePosition
This commit is contained in:
@@ -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.
|
||||||
|
|||||||
@@ -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, {
|
||||||
|
|||||||
Reference in New Issue
Block a user