feat(editor): Add localStorage flag to prevent opening NDV in new canvas (no-changelog) (#10187)

This commit is contained in:
Alex Grozav 2024-07-25 16:00:09 +03:00 committed by GitHub
parent 2f3baa4251
commit 5929351f0c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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());
@ -558,7 +560,7 @@ export function useCanvasOperations({
runAddNodeHooks(nodeData, options);
if (options.openNDV) {
if (options.openNDV && !preventOpeningNDV) {
ndvStore.setActiveNodeName(nodeData.name);
}
});