Use a blackish default for filling texts

This commit is contained in:
Marc Jansen
2015-09-15 11:03:09 +02:00
parent e88f06b70f
commit 80995159b1
3 changed files with 50 additions and 5 deletions

View File

@@ -1,6 +1,9 @@
goog.provide('ol.style.Text');
goog.require('ol.style.Fill');
/**
* @classdesc
@@ -54,7 +57,8 @@ ol.style.Text = function(opt_options) {
* @private
* @type {ol.style.Fill}
*/
this.fill_ = goog.isDef(options.fill) ? options.fill : null;
this.fill_ = goog.isDef(options.fill) ? options.fill :
new ol.style.Fill({color: ol.style.Text.DEFAULT_FILL_COLOR_});
/**
* @private
@@ -76,6 +80,16 @@ ol.style.Text = function(opt_options) {
};
/**
* The default fill color to use if no fill was set at construction time; a
* blackish `#333`.
*
* @const {string}
* @private
*/
ol.style.Text.DEFAULT_FILL_COLOR_ = '#333';
/**
* Get the font name.
* @return {string|undefined} Font.