File tree Expand file tree Collapse file tree 2 files changed +16
-5
lines changed
services/static-webserver/client/source/class/osparc Expand file tree Collapse file tree 2 files changed +16
-5
lines changed Original file line number Diff line number Diff line change @@ -827,6 +827,20 @@ qx.Class.define("osparc.data.model.Workbench", {
827827 }
828828 } )
829829 return Promise . all ( promises ) ;
830- }
830+ } ,
831+
832+ updateWorkbenchFromPatches : function ( workbenchPatches ) {
833+ console . log ( workbenchPatches ) ;
834+ // group the patches by nodeId
835+ const workbenchPatchesByNode = { } ;
836+ workbenchPatches . forEach ( workbenchPatch => {
837+ const nodeId = workbenchPatch . path . split ( "/" ) [ 2 ] ;
838+ if ( ! ( nodeId in workbenchPatchesByNode ) ) {
839+ workbenchPatchesByNode [ nodeId ] = [ ] ;
840+ }
841+ workbenchPatchesByNode [ nodeId ] . push ( workbenchPatch ) ;
842+ } ) ;
843+ console . log ( workbenchPatchesByNode ) ;
844+ } ,
831845 }
832846} ) ;
Original file line number Diff line number Diff line change @@ -364,10 +364,7 @@ qx.Class.define("osparc.desktop.StudyEditor", {
364364 }
365365 }
366366 if ( workbenchPatches . length > 0 ) {
367- // OM todo
368- // this.getStudy().getWorkbench().updateWorkbenchFromDiff(delta["workbench"]);
369- // delete delta["workbench"];
370- // this.getStudy().getWorkbench().updateWorkbenchFromPatches(workbenchPatches);
367+ this . getStudy ( ) . getWorkbench ( ) . updateWorkbenchFromPatches ( workbenchPatches ) ;
371368 }
372369 if ( uiPatches . length > 0 ) {
373370 this . getStudy ( ) . getUi ( ) . updateUiFromPatches ( uiPatches ) ;
You can’t perform that action at this time.
0 commit comments