@@ -10,15 +10,13 @@ var newElement = Utils.newElement, extract = Utils.extract,
1010function setProps(elem, e) {
1111 var props = elem.props;
1212 var element = elem.element;
13− if (element.adjustWidth) {
14− props.width -= element.adjustWidth;
15− }
16− if (element.adjustHeight) {
17− props.height -= element.adjustHeight;
13+ var width = props.width - (element.adjustWidth || 0);
14+ var height = props.height - (element.adjustHeight || 0);
15+ e.style.width = (width |0) + 'px';
16+ e.style.height = (height|0) + 'px';
17+ if (props.opacity !== 1) {
18+ e.style.opacity = props.opacity;
1819 }
19− e.style.width = (props.width |0) + 'px';
20− e.style.height = (props.height|0) + 'px';
21− if (props.opacity !== 1) { e.style.opacity = props.opacity; }
2220 if (props.color.ctor === 'Just') {
2321 e.style.backgroundColor = extract(props.color._0);
2422 }
@@ -325,14 +323,14 @@ function updateProps(node, curr, next) {
325323 var currP = curr.props;
326324 var e = node;
327325 var element = next.element;
328− if (element.adjustWidth) {
329− props.width -= element.adjustWidth;
326+ var width = props.width - (element.adjustWidth || 0);
327+ var height = props.height - (element.adjustHeight || 0);
328+ if (width !== currP.width) {
329+ e.style.width = (width|0) + 'px';
330330 }
331− if (element.adjustHeight) {
332− props.height -= element.adjustHeight;
331+ if (height !== currP.height) {
332+ e.style.height = (height|0) + 'px';
333333 }
334− if (props.width !== currP.width) e.style.width = (props.width |0) + 'px';
335− if (props.height !== currP.height) e.style.height = (props.height|0) + 'px';
336334 if (props.opacity !== 1 && props.opacity !== currP.opacity) {
337335 e.style.opacity = props.opacity;
338336 }