Skip to content

Commit

Permalink
feat(editor): Add localStorage flag to prevent opening NDV in new can…
Browse files Browse the repository at this point in the history
…vas (no-changelog) (#10187)
  • Loading branch information
alexgrozav committed Jul 25, 2024
1 parent 2f3baa4 commit 5929351
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/editor-ui/src/composables/useCanvasOperations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ export function useCanvasOperations({
const externalHooks = useExternalHooks();
const clipboard = useClipboard();

const preventOpeningNDV = !!localStorage.getItem('NodeView.preventOpeningNDV');

const editableWorkflow = computed(() => workflowsStore.workflow);
const editableWorkflowObject = computed(() => workflowsStore.getCurrentWorkflow());

Expand Down Expand Up @@ -558,7 +560,7 @@ export function useCanvasOperations({

runAddNodeHooks(nodeData, options);

if (options.openNDV) {
if (options.openNDV && !preventOpeningNDV) {
ndvStore.setActiveNodeName(nodeData.name);
}
});
Expand Down

0 comments on commit 5929351

Please sign in to comment.