Skip to content

Commit eacee48

Browse files
committed
__listenToProjectDocument
1 parent 3eb1d70 commit eacee48

File tree

1 file changed

+14
-0
lines changed
  • services/static-webserver/client/source/class/osparc/desktop

1 file changed

+14
-0
lines changed

services/static-webserver/client/source/class/osparc/desktop/StudyEditor.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,10 @@ qx.Class.define("osparc.desktop.StudyEditor", {
256256
workbench.addListener("updateStudyDocument", () => this.updateStudyDocument());
257257
workbench.addListener("restartAutoSaveTimer", () => this.__restartAutoSaveTimer());
258258
}
259+
260+
if (osparc.utils.DisabledPlugins.isRTCEnabled()) {
261+
this.__listenToProjectDocument();
262+
}
259263
},
260264

261265
__setStudyDataInBackend: function(studyData) {
@@ -281,6 +285,16 @@ qx.Class.define("osparc.desktop.StudyEditor", {
281285
this.__listenToStatePorts();
282286
},
283287

288+
__listenToProjectDocument: function() {
289+
const socket = osparc.wrapper.WebSocket.getInstance();
290+
291+
if (!socket.slotExists("projectDocument:updated")) {
292+
socket.on("projectDocument:updated", data => {
293+
console.log("projectDocument:updated", data);
294+
}, this);
295+
}
296+
},
297+
284298
__listenToLogger: function() {
285299
const socket = osparc.wrapper.WebSocket.getInstance();
286300

0 commit comments

Comments
 (0)