Skip to content

Commit aadce92

Browse files
removed clear confirmation during load project
1 parent 02412af commit aadce92

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

js/activity.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1082,7 +1082,7 @@ class Activity {
10821082
document.body.appendChild(modal);
10831083
};
10841084

1085-
this._allClear = (noErase) => {
1085+
this._allClear = (noErase, skipConfirmation = false) => {
10861086
const clearCanvasAction = () => {
10871087
this.blocks.activeBlock = null;
10881088
hideDOMLabel();
@@ -1130,7 +1130,11 @@ class Activity {
11301130
}
11311131
};
11321132

1133-
renderClearConfirmation(clearCanvasAction);
1133+
if (skipConfirmation) {
1134+
clearCanvasAction();
1135+
} else {
1136+
renderClearConfirmation(clearCanvasAction);
1137+
}
11341138
};
11351139
/**
11361140
* Sets up play button functionality; runs Music Blocks.
@@ -3723,7 +3727,7 @@ class Activity {
37233727
document.querySelector("#myOpenFile").click();
37243728
window.scroll(0, 0);
37253729
doHardStopButton(that);
3726-
that._allClear(true);
3730+
that._allClear(true, true);
37273731
};
37283732

37293733
window.prepareExport = this.prepareExport;

0 commit comments

Comments
 (0)