feat(editor): Zoom into a node to open experimental embedded NDV (no-changelog) (#16912)

Co-authored-by: Milorad FIlipović <milorad@n8n.io>
This commit is contained in:
Suguru Inoue
2025-07-09 11:50:30 +02:00
committed by GitHub
parent f67581b74d
commit ba692281f0
12 changed files with 152 additions and 53 deletions

View File

@@ -15,6 +15,7 @@ import { useUIStore } from '@/stores/ui.store';
import { shallowRef, watch } from 'vue';
import { computed, type ComputedRef } from 'vue';
import { useWorkflowsStore } from '@/stores/workflows.store';
import { useExperimentalNdvStore } from '@/components/canvas/experimental/experimentalNdv.store';
export function useLogsSelection(
execution: ComputedRef<IExecutionResponse | undefined>,
@@ -33,13 +34,19 @@ export function useLogsSelection(
const uiStore = useUIStore();
const canvasStore = useCanvasStore();
const workflowsStore = useWorkflowsStore();
const experimentalNdvStore = useExperimentalNdvStore();
function syncSelectionToCanvasIfEnabled(value: LogEntry) {
if (!logsStore.isLogSelectionSyncedWithCanvas) {
return;
}
canvasEventBus.emit('nodes:select', { ids: [value.node.id], panIntoView: true });
if (experimentalNdvStore.isEnabled) {
canvasEventBus.emit('nodes:select', { ids: [value.node.id], panIntoView: false });
experimentalNdvStore.focusNode(value.node.id);
} else {
canvasEventBus.emit('nodes:select', { ids: [value.node.id], panIntoView: true });
}
}
function select(value: LogEntry | undefined) {