| 121 | | switch (options.position) { |
| 122 | | case 'center': |
| 123 | | top += (wnd.height() / 2) - (uiDialog.height() / 2); |
| 124 | | left += (wnd.width() / 2) - (uiDialog.width() / 2); |
| 125 | | break; |
| 126 | | case 'top': |
| 127 | | top += 0; |
| 128 | | left += (wnd.width() / 2) - (uiDialog.width() / 2); |
| 129 | | break; |
| 130 | | case 'right': |
| 131 | | top += (wnd.height() / 2) - (uiDialog.height() / 2); |
| 132 | | left += (wnd.width()) - (uiDialog.width()); |
| 133 | | break; |
| 134 | | case 'bottom': |
| 135 | | top += (wnd.height()) - (uiDialog.height()); |
| 136 | | left += (wnd.width() / 2) - (uiDialog.width() / 2); |
| 137 | | break; |
| 138 | | case 'left': |
| 139 | | top += (wnd.height() / 2) - (uiDialog.height() / 2); |
| 140 | | left += 0; |
| 141 | | break; |
| | 121 | if (options.position.constructor == Array) { |
| | 122 | // [x, y] |
| | 123 | top += options.position[1]; |
| | 124 | left += options.position[0]; |
| | 125 | } else { |
| | 126 | switch (options.position) { |
| | 127 | case 'center': |
| | 128 | top += (wnd.height() / 2) - (uiDialog.height() / 2); |
| | 129 | left += (wnd.width() / 2) - (uiDialog.width() / 2); |
| | 130 | break; |
| | 131 | case 'top': |
| | 132 | top += 0; |
| | 133 | left += (wnd.width() / 2) - (uiDialog.width() / 2); |
| | 134 | break; |
| | 135 | case 'right': |
| | 136 | top += (wnd.height() / 2) - (uiDialog.height() / 2); |
| | 137 | left += (wnd.width()) - (uiDialog.width()); |
| | 138 | break; |
| | 139 | case 'bottom': |
| | 140 | top += (wnd.height()) - (uiDialog.height()); |
| | 141 | left += (wnd.width() / 2) - (uiDialog.width() / 2); |
| | 142 | break; |
| | 143 | case 'left': |
| | 144 | top += (wnd.height() / 2) - (uiDialog.height() / 2); |
| | 145 | left += 0; |
| | 146 | break; |
| | 147 | default: |
| | 148 | //center |
| | 149 | top += (wnd.height() / 2) - (uiDialog.height() / 2); |
| | 150 | left += (wnd.width() / 2) - (uiDialog.width() / 2); |
| | 151 | } |