Bug #3678 » 0003-Fix-WDialog-drag-with-bottom-or-right-positioning.patch
src/js/WDialog.js | ||
---|---|---|
if (wxy.x > 0 && wxy.x < wsize.x && wxy.y > 0 && wxy.y < wsize.y) {
|
||
centerX = centerY = false;
|
||
el.style.left = (WT.px(el, 'left') + nowxy.x - dsx) + 'px';
|
||
el.style.top = (WT.px(el, 'top') + nowxy.y - dsy) + 'px';
|
||
el.style.right = '';
|
||
el.style.bottom = '';
|
||
if (el.style.right === 'auto' || el.style.right === '') {
|
||
el.style.left = (WT.px(el, 'left') + nowxy.x - dsx) + 'px';
|
||
el.style.right = '';
|
||
}
|
||
else {
|
||
el.style.right = (WT.px(el, 'right') + dsx - nowxy.x) + 'px';
|
||
el.style.left = 'auto';
|
||
}
|
||
if (el.style.bottom === 'auto' || el.style.bottom === '') {
|
||
el.style.top = (WT.px(el, 'top') + nowxy.y - dsy) + 'px';
|
||
el.style.bottom = '';
|
||
}
|
||
else {
|
||
el.style.bottom = (WT.px(el, 'bottom') + dsy - nowxy.y) + 'px';
|
||
el.style.top = 'auto';
|
||
}
|
||
dsx = nowxy.x;
|
||
dsy = nowxy.y;
|
||
}
|