Bug #3678 » 0003-Fix-WDialog-drag-with-bottom-or-right-positioning.patch
src/js/WDialog.js | ||
---|---|---|
49 | 49 |
if (wxy.x > 0 && wxy.x < wsize.x && wxy.y > 0 && wxy.y < wsize.y) { |
50 | 50 |
centerX = centerY = false; |
51 | 51 | |
52 |
el.style.left = (WT.px(el, 'left') + nowxy.x - dsx) + 'px'; |
|
53 |
el.style.top = (WT.px(el, 'top') + nowxy.y - dsy) + 'px'; |
|
54 |
el.style.right = ''; |
|
55 |
el.style.bottom = ''; |
|
52 |
if (el.style.right === 'auto' || el.style.right === '') { |
|
53 |
el.style.left = (WT.px(el, 'left') + nowxy.x - dsx) + 'px'; |
|
54 |
el.style.right = ''; |
|
55 |
} |
|
56 |
else { |
|
57 |
el.style.right = (WT.px(el, 'right') + dsx - nowxy.x) + 'px'; |
|
58 |
el.style.left = 'auto'; |
|
59 |
} |
|
60 | ||
61 |
if (el.style.bottom === 'auto' || el.style.bottom === '') { |
|
62 |
el.style.top = (WT.px(el, 'top') + nowxy.y - dsy) + 'px'; |
|
63 |
el.style.bottom = ''; |
|
64 |
} |
|
65 |
else { |
|
66 |
el.style.bottom = (WT.px(el, 'bottom') + dsy - nowxy.y) + 'px'; |
|
67 |
el.style.top = 'auto'; |
|
68 |
} |
|
69 | ||
56 | 70 |
dsx = nowxy.x; |
57 | 71 |
dsy = nowxy.y; |
58 | 72 |
} |
59 |
- |