From 86cc86f90449033bbb0fc1239a3ff95a9d0de349 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Fri, 12 Nov 2021 13:22:55 +0100 Subject: [PATCH] Update Property --- src/style_manager/model/Property.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/style_manager/model/Property.js b/src/style_manager/model/Property.js index 61e02b61a..1b14934b8 100644 --- a/src/style_manager/model/Property.js +++ b/src/style_manager/model/Property.js @@ -82,9 +82,10 @@ export default class Property extends Model { * Get property value. * @returns {String} */ - getValue() { + getValue(opts = {}) { + const { noDefault } = opts; const val = this.get('value'); - return !this.hasValue() ? this.getDefaultValue() : val; + return !this.hasValue() && !noDefault ? this.getDefaultValue() : val; } /** @@ -105,7 +106,9 @@ export default class Property extends Model { upValue(value, opts) { const parsed = - value === null ? this.__getClearProps() : this.parseValue(value); + value === null || value === '' + ? this.__getClearProps() + : this.parseValue(value); return this._up(parsed, opts); }