fine tuning
This commit is contained in:
parent
88bbbc5e91
commit
9d1c8568ce
@ -30,7 +30,7 @@ namespace BinaryDad.Coding.Hubs
|
||||
{
|
||||
Console.WriteLine($"Sending code from {user}");
|
||||
|
||||
return Clients.All.SendAsync("ReceiveCode", user, index, code);
|
||||
return Clients.Others.SendAsync("ReceiveCode", user, index, code);
|
||||
}
|
||||
|
||||
|
||||
|
@ -14,6 +14,7 @@
|
||||
let isTeacher = window.location.hash === '#4ELQcUq7UnFGghAZCVr4Chr9JmtncigfkGu5WSf9';
|
||||
|
||||
let isLive = false;
|
||||
let editorLock = false;
|
||||
|
||||
let isLiveMode = function () {
|
||||
|
||||
@ -73,8 +74,12 @@
|
||||
|
||||
if (!isTeacher && isLive) {
|
||||
|
||||
editorLock = true;
|
||||
|
||||
let editor = ace.edit($editors[index]);
|
||||
|
||||
editorLock = false;
|
||||
|
||||
editor.session.setValue(code);
|
||||
}
|
||||
});
|
||||
@ -100,7 +105,10 @@
|
||||
let editor = ace.edit(e);
|
||||
|
||||
editor.session.on('change', function () {
|
||||
updateCode(editor, i);
|
||||
|
||||
if (!editorLock) {
|
||||
updateCode(editor, i);
|
||||
};
|
||||
});
|
||||
|
||||
// send initial code
|
||||
|
Loading…
x
Reference in New Issue
Block a user