@@ -10,15 +10,13 @@ var newElement = Utils.newElement, extract = Utils.extract,
10function setProps(elem, e) {
10function setProps(elem, e) {
11 var props = elem.props;
11 var props = elem.props;
12 var element = elem.element;
12 var element = elem.element;
13− if (element.adjustWidth) {
13+ var width = props.width - (element.adjustWidth || 0);
14− props.width -= element.adjustWidth;
14+ var height = props.height - (element.adjustHeight || 0);
15− }
15+ e.style.width = (width |0) + 'px';
16− if (element.adjustHeight) {
16+ e.style.height = (height|0) + 'px';
17− props.height -= element.adjustHeight;
17+ if (props.opacity !== 1) {
18+ e.style.opacity = props.opacity;
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; }
22 if (props.color.ctor === 'Just') {
20 if (props.color.ctor === 'Just') {
23 e.style.backgroundColor = extract(props.color._0);
21 e.style.backgroundColor = extract(props.color._0);
@@ -325,14 +323,14 @@ function updateProps(node, curr, next) {
325 var currP = curr.props;
323 var currP = curr.props;
326 var e = node;
324 var e = node;
327 var element = next.element;
325 var element = next.element;
328− if (element.adjustWidth) {
326+ var width = props.width - (element.adjustWidth || 0);
329− props.width -= element.adjustWidth;
327+ var height = props.height - (element.adjustHeight || 0);
328+ if (width !== currP.width) {
329+ e.style.width = (width|0) + 'px';
331− if (element.adjustHeight) {
331+ if (height !== currP.height) {
332− props.height -= element.adjustHeight;
332+ e.style.height = (height|0) + 'px';
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';
336 if (props.opacity !== 1 && props.opacity !== currP.opacity) {
334 if (props.opacity !== 1 && props.opacity !== currP.opacity) {
337 e.style.opacity = props.opacity;
335 e.style.opacity = props.opacity;