We are guarnteed that all TextLiteral properties are defined (see #770)

Instead of using the browser defaults, we use `ol.style.TextDefaults`.
This commit is contained in:
Tim Schaub
2013-06-21 09:53:28 -06:00
parent c7da7e4c2e
commit cab983f826
2 changed files with 5 additions and 20 deletions

View File

@@ -26,18 +26,13 @@ ol.style.TextLiteralOptions;
*/
ol.style.TextLiteral = function(options) {
goog.asserts.assertString(options.color, 'color must be a string');
/** @type {string} */
this.color = options.color;
if (goog.isDef(options.color)) {
goog.asserts.assertString(options.color, 'color must be a string');
}
goog.asserts.assertString(options.fontFamily, 'fontFamily must be a string');
/** @type {string} */
this.fontFamily = options.fontFamily;
if (goog.isDef(options.fontFamily)) {
goog.asserts.assertString(options.fontFamily,
'fontFamily must be a string');
}
goog.asserts.assertNumber(options.fontSize, 'fontSize must be a number');
/** @type {number} */