mirror of
https://github.com/lubosz/overte.git
synced 2025-08-07 16:41:02 +02:00
Fix BUGZ-203
This commit is contained in:
parent
ee226f7e44
commit
dc370d676a
1 changed files with 10 additions and 0 deletions
|
@ -103,6 +103,8 @@ var AVATAR_APP_PRESENTATION_MODE = Desktop.PresentationMode.NATIVE;
|
||||||
var AVATAR_APP_WIDTH_PX = 480;
|
var AVATAR_APP_WIDTH_PX = 480;
|
||||||
var AVATAR_APP_HEIGHT_PX = 615;
|
var AVATAR_APP_HEIGHT_PX = 615;
|
||||||
var avatarAppWindow = false;
|
var avatarAppWindow = false;
|
||||||
|
var POPOUT_SAFE_MARGIN_X = 30;
|
||||||
|
var POPOUT_SAFE_MARGIN_Y = 30;
|
||||||
function toggleAvatarApp() {
|
function toggleAvatarApp() {
|
||||||
if (avatarAppWindow) {
|
if (avatarAppWindow) {
|
||||||
avatarAppWindow.close();
|
avatarAppWindow.close();
|
||||||
|
@ -119,6 +121,10 @@ function toggleAvatarApp() {
|
||||||
size: {
|
size: {
|
||||||
x: AVATAR_APP_WIDTH_PX,
|
x: AVATAR_APP_WIDTH_PX,
|
||||||
y: AVATAR_APP_HEIGHT_PX
|
y: AVATAR_APP_HEIGHT_PX
|
||||||
|
},
|
||||||
|
position: {
|
||||||
|
x: Math.max(Window.x + POPOUT_SAFE_MARGIN_X, Window.x + Window.innerWidth / 2 - AVATAR_APP_WIDTH_PX / 2),
|
||||||
|
y: Math.max(Window.y + POPOUT_SAFE_MARGIN_Y, Window.y + Window.innerHeight / 2 - AVATAR_APP_HEIGHT_PX / 2)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -181,6 +187,10 @@ function toggleSettingsApp() {
|
||||||
size: {
|
size: {
|
||||||
x: SETTINGS_APP_WIDTH_PX,
|
x: SETTINGS_APP_WIDTH_PX,
|
||||||
y: SETTINGS_APP_HEIGHT_PX
|
y: SETTINGS_APP_HEIGHT_PX
|
||||||
|
},
|
||||||
|
position: {
|
||||||
|
x: Math.max(Window.x + POPOUT_SAFE_MARGIN_X, Window.x + Window.innerWidth / 2 - SETTINGS_APP_WIDTH_PX / 2),
|
||||||
|
y: Math.max(Window.y + POPOUT_SAFE_MARGIN_Y, Window.y + Window.innerHeight / 2 - SETTINGS_APP_HEIGHT_PX / 2)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue