on master help sign in
Fixed issue #234

By removing old style properties in setPos

commitc58c97bb7668bc5345b503d0b335c0d7aeec6b7a authorAlex Neslusan <deadfoxygrandpa@gmail.com> dateSun 1 Sep 2013, 13:49 (13 years ago) parent1f48a27
1 file changed+4−4
runtime/Render/Element.js+4−4
runtime/Render/Element.js+4−4
@@ -129,14 +129,14 @@ function setPos(pos,w,h,e) {
129129 e.style.margin = 'auto';
130130 var transform = '';
131131 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;
133133 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;
135135 }
136136 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;
138138 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;
140140 }
141141 if (transform !== '') addTransform(e.style, transform);
142142 return e;