- update windows when broswer is resized
This commit is contained in:
parent
af830ffe16
commit
13046276fe
@ -91,8 +91,10 @@ package org.bigbluebutton.modules.layout.managers
|
|||||||
public function LayoutManager() {
|
public function LayoutManager() {
|
||||||
_applyCurrentLayoutTimer.addEventListener(TimerEvent.TIMER, function(e:TimerEvent):void {
|
_applyCurrentLayoutTimer.addEventListener(TimerEvent.TIMER, function(e:TimerEvent):void {
|
||||||
applyLayout(_currentLayout);
|
applyLayout(_currentLayout);
|
||||||
|
trace(LOG + "Applied layout after user resized browser");
|
||||||
});
|
});
|
||||||
_sendCurrentLayoutUpdateTimer.addEventListener(TimerEvent.TIMER, function(e:TimerEvent):void {
|
_sendCurrentLayoutUpdateTimer.addEventListener(TimerEvent.TIMER, function(e:TimerEvent):void {
|
||||||
|
trace(LOG + "Applying layout due to window resize");
|
||||||
sendLayoutUpdate(updateCurrentLayout());
|
sendLayoutUpdate(updateCurrentLayout());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -320,6 +322,7 @@ package org.bigbluebutton.modules.layout.managers
|
|||||||
}
|
}
|
||||||
|
|
||||||
private function onContainerResized(e:ResizeEvent):void {
|
private function onContainerResized(e:ResizeEvent):void {
|
||||||
|
trace(LOG + "Canvas is changing as user is resizing browser");
|
||||||
/*
|
/*
|
||||||
* the main canvas has been resized
|
* the main canvas has been resized
|
||||||
* while the user is resizing the window, this event is dispatched
|
* while the user is resizing the window, this event is dispatched
|
||||||
@ -335,10 +338,10 @@ package org.bigbluebutton.modules.layout.managers
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
checkPermissionsOverWindow(e.window);
|
checkPermissionsOverWindow(e.window);
|
||||||
if (_detectContainerChange) {
|
trace(LOG + "Window is being resized. Event=[" + e.type + "]");
|
||||||
_globalDispatcher.dispatchEvent(new LayoutEvent(LayoutEvent.INVALIDATE_LAYOUT_EVENT));
|
updateCurrentLayout();
|
||||||
/*
|
/*
|
||||||
* some events related to animated actions must be delayed because if it's not the
|
* some events related to animated actions must be delayed because if it's not, the
|
||||||
* current layout doesn't get properly updated
|
* current layout doesn't get properly updated
|
||||||
*/
|
*/
|
||||||
if (_eventsToDelay.indexOf(e.type) != -1) {
|
if (_eventsToDelay.indexOf(e.type) != -1) {
|
||||||
@ -346,7 +349,6 @@ package org.bigbluebutton.modules.layout.managers
|
|||||||
_sendCurrentLayoutUpdateTimer.start();
|
_sendCurrentLayoutUpdateTimer.start();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private function updateCurrentLayout(layout:LayoutDefinition=null):LayoutDefinition {
|
private function updateCurrentLayout(layout:LayoutDefinition=null):LayoutDefinition {
|
||||||
if (layout != null) {
|
if (layout != null) {
|
||||||
|
Loading…
Reference in New Issue
Block a user