dresscode-botex
Advanced tools
Comparing version 0.0.1 to 0.0.2
@@ -40,4 +40,4 @@ Botex.CSS = { | ||
value.forEach(function(subvalue) { | ||
propStrings.push(' ', property, ': ', subvalue, ';\n'); | ||
}); | ||
propStrings.push(' ', property, ': ', this._prepareValue(subvalue), ';\n'); | ||
}, this); | ||
} else if (typeof value === 'object') { | ||
@@ -50,3 +50,3 @@ if (/^@media /.test(property)) { | ||
} else { | ||
propStrings.push(' ', property, ': ', value, ';\n'); | ||
propStrings.push(' ', property, ': ', this._prepareValue(value), ';\n'); | ||
} | ||
@@ -56,3 +56,7 @@ } | ||
return (rule ? [rule, ' {\n', propStrings.join(''), '}'].join('') : '') + '\n' + cascades.join(''); | ||
}, | ||
_prepareValue: function(value) { | ||
return typeof value === 'number' ? value + 'px' : String(value); | ||
} | ||
}; |
@@ -215,15 +215,13 @@ Botex.Widget = Bricks.inherit(Botex.Tag, { | ||
if (meta.style) { | ||
var style = {}; | ||
Pony.Object.keys(meta.style).forEach(function(prop) { | ||
if (meta.style[prop] instanceof Quantum.Quant) { | ||
this._domEventsController.on(meta.style[prop], 'change', this.$$_onMutableStyleChange, { | ||
var value = meta.style[prop]; | ||
if (value instanceof Quantum.Quant) { | ||
this._domEventsController.on(value, 'change', this.$$_onMutableStyleChange, { | ||
el: el, | ||
prop: prop | ||
}); | ||
style[prop] = meta.style[prop].getValue(); | ||
} else { | ||
style[prop] = meta.style[prop]; | ||
value = value.getValue(); | ||
} | ||
Bricks.DOM.setStyleProperty(el, prop, value); | ||
}, this); | ||
Bricks.DOM.setStyle(el, style); | ||
} | ||
@@ -363,6 +361,4 @@ Pony.Object.keys(meta.attrs).forEach(function(prop) { | ||
// this не указывает на текущий экземпляр класса | ||
var style = {}; | ||
style[this.prop] = evt.value; | ||
Bricks.DOM.setStyle(this.el, style); | ||
Bricks.DOM.setStyleProperty(this.el, this.prop, evt.value); | ||
} | ||
}); |
{ | ||
"name": "dresscode-botex", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"dependencies": { | ||
@@ -5,0 +5,0 @@ "dresscode-bricks": "latest", |
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
41678
30
1
80
1117