on master help sign in
Fixed issue #234
c58c97bAlex Neslusan
runtime/Render/Element.js+4−4
@@ -129,14 +129,14 @@ function setPos(pos,w,h,e) {
129 e.style.margin = 'auto';
129 e.style.margin = 'auto';
130 var transform = '';
130 var transform = '';
131 switch(pos.horizontal.ctor) {
131 switch(pos.horizontal.ctor) {
132− case 'P': e.style.right = toPos(pos.x); break;
132+ case 'P': e.style.right = toPos(pos.x); e.style.removeProperty('left'); break;
133 case 'Z': transform = 'translateX(' + ((-w/2)|0) + 'px) ';
133 case 'Z': transform = 'translateX(' + ((-w/2)|0) + 'px) ';
134− case 'N': e.style.left = toPos(pos.x); break;
134+ case 'N': e.style.left = toPos(pos.x); e.style.removeProperty('right'); break;
135 }
135 }
136 switch(pos.vertical.ctor) {
136 switch(pos.vertical.ctor) {
137− case 'N': e.style.bottom = toPos(pos.y); break;
137+ case 'N': e.style.bottom = toPos(pos.y); e.style.removeProperty('top'); break;
138 case 'Z': transform += 'translateY(' + ((-h/2)|0) + 'px)';
138 case 'Z': transform += 'translateY(' + ((-h/2)|0) + 'px)';
139− case 'P': e.style.top = toPos(pos.y); break;
139+ case 'P': e.style.top = toPos(pos.y); e.style.removeProperty('bottom'); break;
140 }
140 }
141 if (transform !== '') addTransform(e.style, transform);
141 if (transform !== '') addTransform(e.style, transform);
142 return e;
142 return e;