aboutsummaryrefslogtreecommitdiff
path: root/js/panels/css-panel/css-style.reel/css-style.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/panels/css-panel/css-style.reel/css-style.js')
-rw-r--r--js/panels/css-panel/css-style.reel/css-style.js13
1 files changed, 12 insertions, 1 deletions
diff --git a/js/panels/css-panel/css-style.reel/css-style.js b/js/panels/css-panel/css-style.reel/css-style.js
index dd84c7e9..331faa2f 100644
--- a/js/panels/css-panel/css-style.reel/css-style.js
+++ b/js/panels/css-panel/css-style.reel/css-style.js
@@ -15,6 +15,7 @@ exports.CssStyle = Montage.create(Component, {
15 invalidStyleClass : { value: "style-item-invalid" }, 15 invalidStyleClass : { value: "style-item-invalid" },
16 emptyStyleClass : { value: "empty-css-style" }, 16 emptyStyleClass : { value: "empty-css-style" },
17 source : { value: null }, 17 source : { value: null },
18 units : { value: null },
18 19
19 propertyText : { 20 propertyText : {
20 value: "property", 21 value: "property",
@@ -292,7 +293,17 @@ exports.CssStyle = Montage.create(Component, {
292 value: function(e) { 293 value: function(e) {
293 var property = this.propertyField.value, 294 var property = this.propertyField.value,
294 value = this.valueField.value, 295 value = this.valueField.value,
295 rule = this.getRule(); 296 rule = this.getRule(),
297 units;
298
299 ///// Auto-fill units if not provided and units
300 ///// not previously stored
301 units = this.getUnits(value);
302 if(this.units && units === null && parseInt(value)) {
303 value += this.units;
304 } else if (value !== '0') {
305 this.units = units;
306 }
296 307
297 this.valueText = value; 308 this.valueText = value;
298 309