fix(css): widget properties in css didn't work (#6889)

This commit is contained in:
Martin Yankov
2019-02-13 15:10:06 +02:00
committed by GitHub
parent ddc860128e
commit 8330ac0ac1
5 changed files with 66 additions and 2 deletions

View File

@@ -481,7 +481,8 @@ export class CssState {
if (property in this.view.style) {
this.view.style[`css:${property}`] = value;
} else {
this.view[property] = value;
const camelCasedProperty = property.replace(/-([a-z])/g, function (g) { return g[1].toUpperCase(); });
this.view[camelCasedProperty] = value;
}
} catch (e) {
traceWrite(`Failed to apply property [${property}] with value [${value}] to ${this.view}. ${e}`, traceCategories.Error, traceMessageType.error);