Skip to content

Commit

Permalink
Use Panel functions when saving
Browse files Browse the repository at this point in the history
  • Loading branch information
szschaler authored Nov 30, 2023
1 parent 9b4be7e commit 811478c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions platform/src/Playground.js
Original file line number Diff line number Diff line change
Expand Up @@ -967,13 +967,14 @@ function getPreviousVisibleSibling(element) {

function savePanelContents(event){

let editablePanels = panels.filter (p => ((p instanceof ProgramPanel) || (p instanceof XtextEditorPanel)))
let panelsToSave = panels.filter (p => p.canSave());

let fileStorePromises = [];

for(const panel of editablePanels){
// FIXME: This currently creates separate commits for each panel. We really would want one commit for all of them together...
for(const panel of panelsToSave){

let storePromise = fileHandler.storeFile(panel.getFileUrl(), panel.getValueSha(), panel.getValue());
let storePromise = panel.save(fileHandler);

if (storePromise!=null) {

Expand Down

0 comments on commit 811478c

Please sign in to comment.