You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openmeetings.apache.org by so...@apache.org on 2021/03/22 03:08:29 UTC
[openmeetings] branch master updated: [OPENMEETINGS-2530] wb is
resized on window resize and chat pannel toggle
This is an automated email from the ASF dual-hosted git repository.
solomax pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/openmeetings.git
The following commit(s) were added to refs/heads/master by this push:
new 8c63465 [OPENMEETINGS-2530] wb is resized on window resize and chat pannel toggle
8c63465 is described below
commit 8c634651878d32922a6ae739c04b86fed7a656a4
Author: Maxim Solodovnik <so...@gmail.com>
AuthorDate: Mon Mar 22 10:08:16 2021 +0700
[OPENMEETINGS-2530] wb is resized on window resize and chat pannel toggle
---
openmeetings-web/src/main/front/chat/src/chat.js | 6 ++++++
openmeetings-web/src/main/front/room/src/room.js | 2 ++
.../src/main/front/wb/src/wb-area-base.js | 1 +
openmeetings-web/src/main/front/wb/src/wb-area.js | 9 ++++++++
openmeetings-web/src/main/front/wb/src/wb.js | 8 ++++---
openmeetings-web/src/main/webapp/css/raw-room.css | 25 +++++++---------------
6 files changed, 31 insertions(+), 20 deletions(-)
diff --git a/openmeetings-web/src/main/front/chat/src/chat.js b/openmeetings-web/src/main/front/chat/src/chat.js
index 7486543..e5a5086 100644
--- a/openmeetings-web/src/main/front/chat/src/chat.js
+++ b/openmeetings-web/src/main/front/chat/src/chat.js
@@ -376,6 +376,9 @@ function _open(handler) {
ctrlBlk.attr('title', ctrlBlk.data('ttl-undock'));
if (roomMode) {
_setOpened();
+ if (typeof(window.WbArea) === 'object') {
+ window.WbArea.resize();
+ }
} else {
__setCssHeight(openedHeight);
}
@@ -397,6 +400,9 @@ function _close(handler) {
if (roomMode) {
__setCssWidth(closedSizePx);
_removeResize();
+ if (typeof(window.WbArea) === 'object') {
+ window.WbArea.resize();
+ }
} else {
__setCssHeight(closedSizePx);
}
diff --git a/openmeetings-web/src/main/front/room/src/room.js b/openmeetings-web/src/main/front/room/src/room.js
index a4a699e..19d55ae 100644
--- a/openmeetings-web/src/main/front/room/src/room.js
+++ b/openmeetings-web/src/main/front/room/src/room.js
@@ -39,6 +39,7 @@ function _init(_options) {
Sharer.init();
UserList.init(options);
_setSize();
+ $(window).on('resize.omwb', window.WbArea.resize);
}
function __dockSetMode(mode) {
const icon = dock.find('i').removeClass('icon-dock icon-undock');
@@ -189,6 +190,7 @@ function _unload() {
$('.ui-dialog.user-video').remove();
$(window).off('keyup.openmeetings');
$(window).off('keydown.openmeetings');
+ $(window).off('resize.omwb');
$(window).off('keydown.om-sip');
$(window).off('keyup.om-sip');
$(document).off('click', _mouseHandler);
diff --git a/openmeetings-web/src/main/front/wb/src/wb-area-base.js b/openmeetings-web/src/main/front/wb/src/wb-area-base.js
index 0b2ab34..70fc220 100644
--- a/openmeetings-web/src/main/front/wb/src/wb-area-base.js
+++ b/openmeetings-web/src/main/front/wb/src/wb-area-base.js
@@ -26,5 +26,6 @@ module.exports = class WbAreaBase {
this.setRole = () => {};
this.addDeleteHandler = () => {};
this.removeDeleteHandler = () => {};
+ this.resize = () => {};
}
};
diff --git a/openmeetings-web/src/main/front/wb/src/wb-area.js b/openmeetings-web/src/main/front/wb/src/wb-area.js
index eb60d30..55abe77 100644
--- a/openmeetings-web/src/main/front/wb/src/wb-area.js
+++ b/openmeetings-web/src/main/front/wb/src/wb-area.js
@@ -454,5 +454,14 @@ module.exports = class DrawWbArea extends WbAreaBase {
_getWbContent(wbId).remove();
});
};
+ this.resize = () => {
+ if (!_inited) {
+ return;
+ }
+ const tabs = $('.room-block .wb-block .tabs');
+ tabs.find('.wb-tab-content .wb-tab').each(function() {
+ $(this).data().resize();
+ });
+ };
}
};
diff --git a/openmeetings-web/src/main/front/wb/src/wb.js b/openmeetings-web/src/main/front/wb/src/wb.js
index 8d6a3cf..173a27f 100644
--- a/openmeetings-web/src/main/front/wb/src/wb.js
+++ b/openmeetings-web/src/main/front/wb/src/wb.js
@@ -278,12 +278,14 @@ module.exports = class Wb {
.setHeight(zoomBar.getZoom() * self.height)
.setZoom(zoomBar.getZoom());
}
- function _setSize() {
+ function _setSize(skipSendWsMsg) {
zoomBar.setSize();
self.eachCanvas(function(canvas) {
__setSize(canvas);
});
- self._doSetSlide(self.slide);
+ if (!skipSendWsMsg) {
+ self._doSetSlide(self.slide);
+ }
}
function _videoStatus(json) {
const g = self._findObject(json);
@@ -352,7 +354,7 @@ module.exports = class Wb {
this.doSetSize = _setSize;
this.resize = () => {
if (zoomBar.getMode() !== 'ZOOM') {
- _setSize();
+ _setSize(true);
}
};
this._showCurrentSlide = () => {
diff --git a/openmeetings-web/src/main/webapp/css/raw-room.css b/openmeetings-web/src/main/webapp/css/raw-room.css
index 4ed6934..110aa8c 100644
--- a/openmeetings-web/src/main/webapp/css/raw-room.css
+++ b/openmeetings-web/src/main/webapp/css/raw-room.css
@@ -74,33 +74,24 @@ html[dir="rtl"] .room-block .sb-wb .sidebar {
height: calc(100% - var(--room-sidebar-header-height) - var(--buffer-size));
}
.room-block .sb-wb .sidebar .user-list .user.entry {
- min-height: 60px;
+ min-height: 90px;
padding-left: 5px;
padding-top: 5px;
- background-size: 55px;
+ background-size: 80px;
background-repeat: no-repeat;
background-position: 2px 2px;
position: relative;
}
.room-block .sb-wb .sidebar .user-list .user.entry:hover {
- background-size: 75px;
- min-height: 80px;
-}
-.room-block .sb-wb .sidebar .user-list .user.entry:hover .user.name {
- padding: 0;
- margin-top: 84px;
- min-height: 18px;
+ background-size: 55px;
}
.room-block .sb-wb .sidebar .user-list .user.entry .user.actions {
display: none;
}
-.room-block.narrow .sidebar .user-list .user.entry:hover .user.actions {
- margin-top: 84px;
-}
.room-block .sb-wb .sidebar .user-list .user.entry:hover .user.actions {
display: block;
padding: 0;
- margin-right: 35px;
+ margin-top: 45px;
}
.room-block .sb-wb .sidebar .user-list .user.name {
line-height: 18px;
@@ -138,14 +129,14 @@ html[dir="rtl"] .room-block .sb-wb .sidebar {
.user-list .user.entry:hover .video-container
, .user-list .user.entry:hover .video-container .video.audio-only
{
- width: 80px;
- height: 80px;
+ width: 50px;
+ height: 50px;
}
.user-list .user.entry .video-container
, .user-list .user.entry .video-container .video.audio-only
{
- width: 50px;
- height: 50px;
+ width: 80px;
+ height: 80px;
}
.user-list .user.entry .video-container .footer {
display: none !important;