Skip to content

Commit

Permalink
removed clear confirmation during load project (#4153)
Browse files Browse the repository at this point in the history
  • Loading branch information
subhas-pramanik-09 authored Dec 19, 2024
1 parent 7057e8b commit 3b92197
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions js/activity.js
Original file line number Diff line number Diff line change
Expand Up @@ -1082,7 +1082,7 @@ class Activity {
document.body.appendChild(modal);
};

this._allClear = (noErase) => {
this._allClear = (noErase, skipConfirmation = false) => {
const clearCanvasAction = () => {
this.blocks.activeBlock = null;
hideDOMLabel();
Expand Down Expand Up @@ -1130,7 +1130,11 @@ class Activity {
}
};

renderClearConfirmation(clearCanvasAction);
if (skipConfirmation) {
clearCanvasAction();
} else {
renderClearConfirmation(clearCanvasAction);
}
};
/**
* Sets up play button functionality; runs Music Blocks.
Expand Down Expand Up @@ -3723,7 +3727,7 @@ class Activity {
document.querySelector("#myOpenFile").click();
window.scroll(0, 0);
doHardStopButton(that);
that._allClear(true);
that._allClear(true, true);
};

window.prepareExport = this.prepareExport;
Expand Down

0 comments on commit 3b92197

Please sign in to comment.