Skip to content

Commit e85e0e6

Browse files
committed
clear canvas tweak
1 parent 279890c commit e85e0e6

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

libs/app-canvas/src/app/flow-app.element.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -902,7 +902,10 @@ export class FlowAppElement extends AppElement<NodeInfo, FlowEngine> {
902902
event.stopPropagation();
903903
if (confirm('Are you sure you want to clear the canvas?')) {
904904
setStopAnimations();
905+
905906
this.clearCanvas();
907+
this.flowId = defaultFlowId;
908+
window.history.pushState(undefined, '', ``);
906909
store();
907910
}
908911
return false;

libs/app-canvas/src/app/gl-app.element.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -594,6 +594,8 @@ export class GLAppElement extends AppElement<GLNodeInfo> {
594594
event.stopPropagation();
595595
if (confirm('Are you sure you want to clear the canvas?')) {
596596
this.clearCanvas();
597+
this.flowId = defaultGLFlowId;
598+
window.history.pushState(undefined, '', `/gl`);
597599
store();
598600
}
599601
return false;

0 commit comments

Comments
 (0)