mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 11:28:03 +02:00
Update max window height before it scrolls, according to its position
This commit is contained in:
parent
93ead174aa
commit
8445c9fbc7
1 changed files with 5 additions and 3 deletions
|
@ -403,9 +403,9 @@ var usersWindow = (function () {
|
||||||
+ windowLineHeight + VISIBILITY_SPACER
|
+ windowLineHeight + VISIBILITY_SPACER
|
||||||
+ windowLineHeight + WINDOW_BASE_MARGIN;
|
+ windowLineHeight + WINDOW_BASE_MARGIN;
|
||||||
|
|
||||||
// Limit window to height of viewport minus VU meter and mirror if displayed
|
// Limit window to height of viewport above window position minus VU meter and mirror if displayed
|
||||||
windowHeight = linesOfUsers.length * windowLineHeight - windowLineSpacing + nonUsersHeight;
|
windowHeight = linesOfUsers.length * windowLineHeight - windowLineSpacing + nonUsersHeight;
|
||||||
maxWindowHeight = viewportHeight - AUDIO_METER_HEIGHT;
|
maxWindowHeight = windowPosition.y - AUDIO_METER_HEIGHT;
|
||||||
if (isMirrorDisplay && !isFullscreenMirror) {
|
if (isMirrorDisplay && !isFullscreenMirror) {
|
||||||
maxWindowHeight -= MIRROR_HEIGHT;
|
maxWindowHeight -= MIRROR_HEIGHT;
|
||||||
}
|
}
|
||||||
|
@ -715,7 +715,7 @@ var usersWindow = (function () {
|
||||||
if (clickedOverlay === windowPane) {
|
if (clickedOverlay === windowPane) {
|
||||||
|
|
||||||
overlayX = event.x - WINDOW_MARGIN;
|
overlayX = event.x - WINDOW_MARGIN;
|
||||||
overlayY = event.y - viewportHeight + windowHeight - WINDOW_MARGIN - windowLineHeight;
|
overlayY = event.y - windowPosition.y + windowHeight - WINDOW_MARGIN - windowLineHeight;
|
||||||
|
|
||||||
numLinesBefore = Math.round(overlayY / windowLineHeight);
|
numLinesBefore = Math.round(overlayY / windowLineHeight);
|
||||||
minY = numLinesBefore * windowLineHeight;
|
minY = numLinesBefore * windowLineHeight;
|
||||||
|
@ -822,7 +822,9 @@ var usersWindow = (function () {
|
||||||
x: event.x - movingClickOffset.x,
|
x: event.x - movingClickOffset.x,
|
||||||
y: event.y - movingClickOffset.y
|
y: event.y - movingClickOffset.y
|
||||||
};
|
};
|
||||||
|
calculateWindowHeight();
|
||||||
updateOverlayPositions();
|
updateOverlayPositions();
|
||||||
|
updateUsersDisplay();
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue