Skip to content
This repository has been archived by the owner on Oct 11, 2022. It is now read-only.

Commit

Permalink
Use a better way to save current page before save/generate code
Browse files Browse the repository at this point in the history
  • Loading branch information
Mammad900 committed Jan 19, 2021
1 parent 945a0ba commit ed06e0c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion res/code-generator/generateCode.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ function generateCode(libPath) {
elements.types[elements.data[elements.selectedElement].type].saveProperties(elements.selectedElement)
}

pages.selectPage(pages.currentPage);
pages.data[pages.currentPage].elements=elements.data;
pages.data[pages.currentPage].background=$("#page_bc_color_input").val();
projectCode[$("#codeParts span[data-selected=true]").attr("data-name")]=monacoInstance.getValue();

// Indents text by 4 characters
Expand Down
3 changes: 2 additions & 1 deletion res/file/save.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ var fileIO= {
elements.types[elements.data[elements.selectedElement].type].saveProperties(elements.selectedElement)
}

pages.selectPage(pages.currentPage);
pages.data[pages.currentPage].elements=elements.data;
pages.data[pages.currentPage].background=$("#page_bc_color_input").val();
projectCode[$("#codeParts span[data-selected=true]").attr("data-name")]=monacoInstance.getValue();


Expand Down

0 comments on commit ed06e0c

Please sign in to comment.