File tree Expand file tree Collapse file tree 1 file changed +13
-5
lines changed
services/static-webserver/client/source/class/osparc/desktop Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -291,8 +291,9 @@ qx.Class.define("osparc.desktop.StudyEditor", {
291291 if ( ! socket . slotExists ( "projectDocument:updated" ) ) {
292292 socket . on ( "projectDocument:updated" , data => {
293293 if ( data [ "projectId" ] === this . getStudy ( ) . getUuid ( ) ) {
294- const currentStudy = this . getStudy ( ) . serialize ( ) ;
295- // the projectDocument doesn't contain the following properties
294+ const myStudy = this . getStudy ( ) . serialize ( ) ;
295+ const updatedStudy = data [ "document" ] ;
296+ // the updatedStudy model doesn't contain the following properties
296297 [
297298 "accessRights" ,
298299 "creationDate" ,
@@ -301,10 +302,17 @@ qx.Class.define("osparc.desktop.StudyEditor", {
301302 "tags" ,
302303 "trashedBy" ,
303304 ] . forEach ( prop => {
304- delete currentStudy [ prop ] ;
305+ delete myStudy [ prop ] ;
305306 } ) ;
306- const delta = osparc . wrapper . JsonDiffPatch . getInstance ( ) . diff ( currentStudy , data [ "document" ] ) ;
307- console . log ( "projectDocument:updated delta" , currentStudy , data [ "document" ] , delta ) ;
307+ // ignore the ``state`` property, it has its own channel
308+ [
309+ "state" ,
310+ ] . forEach ( prop => {
311+ delete updatedStudy [ prop ] ;
312+ } ) ;
313+
314+ const delta = osparc . wrapper . JsonDiffPatch . getInstance ( ) . diff ( myStudy , updatedStudy ) ;
315+ console . log ( "projectDocument:updated delta" , myStudy , updatedStudy , delta ) ;
308316 }
309317 } , this ) ;
310318 }
You can’t perform that action at this time.
0 commit comments