fix layout mode click when discussion is activated

This commit is contained in:
Gregoire Parant 2020-10-27 20:46:53 +01:00
parent 55c1bcee66
commit 80355e6b85
4 changed files with 14 additions and 0 deletions

View File

@ -379,6 +379,7 @@ body {
justify-content: center; justify-content: center;
flex-direction: column; flex-direction: column;
overflow: hidden; overflow: hidden;
border-radius: 15px;
} }
.chat-mode { .chat-mode {
@ -622,6 +623,7 @@ div.modal-report-user{
left: calc(50% - 400px); left: calc(50% - 400px);
top: 100px; top: 100px;
background-color: #000000ad; background-color: #000000ad;
border-radius: 15px;
} }
.modal-report-user textarea{ .modal-report-user textarea{
@ -633,6 +635,7 @@ div.modal-report-user{
color: white; color: white;
width: calc(100% - 60px); width: calc(100% - 60px);
margin: 30px; margin: 30px;
border-radius: 15px;
} }
.modal-report-user img{ .modal-report-user img{

View File

@ -643,6 +643,10 @@ export class GameScene extends ResizableScene implements CenterListener {
} }
private switchLayoutMode(): void { private switchLayoutMode(): void {
//if discussion is activated, this layout cannot be activated
if(mediaManager.activatedDiscussion){
return;
}
const mode = layoutManager.getLayoutMode(); const mode = layoutManager.getLayoutMode();
if (mode === LayoutMode.Presentation) { if (mode === LayoutMode.Presentation) {
layoutManager.switchLayoutMode(LayoutMode.VideoChat); layoutManager.switchLayoutMode(LayoutMode.VideoChat);

View File

@ -173,4 +173,7 @@ export class DiscussionManager {
this.sendMessageCallBack.set(userId, callback); this.sendMessageCallBack.set(userId, callback);
} }
get activatedDiscussion(){
return this.activeDiscussion;
}
} }

View File

@ -582,6 +582,10 @@ export class MediaManager {
public addSendMessageCallback(userId: string|number, callback: SendMessageCallback){ public addSendMessageCallback(userId: string|number, callback: SendMessageCallback){
this.discussionManager.onSendMessageCallback(userId, callback) this.discussionManager.onSendMessageCallback(userId, callback)
} }
get activatedDiscussion(){
return this.discussionManager.activatedDiscussion;
}
} }
export const mediaManager = new MediaManager(); export const mediaManager = new MediaManager();