mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-19 19:11:13 +00:00
fix(editor): Add missing trigger waiting tooltip on new canvas (#11918)
This commit is contained in:
@@ -6,13 +6,7 @@ import type {
|
||||
CanvasEventBusEvents,
|
||||
ConnectStartEvent,
|
||||
} from '@/types';
|
||||
import type {
|
||||
Connection,
|
||||
XYPosition,
|
||||
ViewportTransform,
|
||||
NodeDragEvent,
|
||||
GraphNode,
|
||||
} from '@vue-flow/core';
|
||||
import type { Connection, XYPosition, NodeDragEvent, GraphNode } from '@vue-flow/core';
|
||||
import { useVueFlow, VueFlow, PanelPosition, MarkerType } from '@vue-flow/core';
|
||||
import { Background } from '@vue-flow/background';
|
||||
import { MiniMap } from '@vue-flow/minimap';
|
||||
@@ -114,6 +108,7 @@ const {
|
||||
project,
|
||||
nodes: graphNodes,
|
||||
onPaneReady,
|
||||
onNodesInitialized,
|
||||
findNode,
|
||||
viewport,
|
||||
onEdgeMouseLeave,
|
||||
@@ -431,7 +426,6 @@ function emitWithLastSelectedNode(emitFn: (id: string) => void) {
|
||||
*/
|
||||
|
||||
const defaultZoom = 1;
|
||||
const zoom = ref(defaultZoom);
|
||||
const isPaneMoving = ref(false);
|
||||
|
||||
function getProjectedPosition(event?: Pick<MouseEvent, 'clientX' | 'clientY'>) {
|
||||
@@ -469,10 +463,6 @@ async function onResetZoom() {
|
||||
await onZoomTo(defaultZoom);
|
||||
}
|
||||
|
||||
function onViewportChange(viewport: ViewportTransform) {
|
||||
zoom.value = viewport.zoom;
|
||||
}
|
||||
|
||||
function setReadonly(value: boolean) {
|
||||
setInteractive(!value);
|
||||
elementsSelectable.value = true;
|
||||
@@ -589,6 +579,8 @@ function onMinimapMouseLeave() {
|
||||
* Lifecycle
|
||||
*/
|
||||
|
||||
const initialized = ref(false);
|
||||
|
||||
onMounted(() => {
|
||||
props.eventBus.on('fitView', onFitView);
|
||||
props.eventBus.on('nodes:select', onSelectNodes);
|
||||
@@ -604,6 +596,10 @@ onPaneReady(async () => {
|
||||
isPaneReady.value = true;
|
||||
});
|
||||
|
||||
onNodesInitialized(() => {
|
||||
initialized.value = true;
|
||||
});
|
||||
|
||||
watch(() => props.readOnly, setReadonly, {
|
||||
immediate: true,
|
||||
});
|
||||
@@ -617,6 +613,8 @@ const isExecuting = toRef(props, 'executing');
|
||||
provide(CanvasKey, {
|
||||
connectingHandle,
|
||||
isExecuting,
|
||||
initialized,
|
||||
viewport,
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -644,7 +642,6 @@ provide(CanvasKey, {
|
||||
@connect-end="onConnectEnd"
|
||||
@pane-click="onClickPane"
|
||||
@contextmenu="onOpenContextMenu"
|
||||
@viewport-change="onViewportChange"
|
||||
@move-start="onPaneMoveStart"
|
||||
@move-end="onPaneMoveEnd"
|
||||
@node-drag-stop="onNodeDragStop"
|
||||
@@ -717,7 +714,7 @@ provide(CanvasKey, {
|
||||
:position="controlsPosition"
|
||||
:show-interactive="false"
|
||||
:show-bug-reporting-button="showBugReportingButton"
|
||||
:zoom="zoom"
|
||||
:zoom="viewport.zoom"
|
||||
@zoom-to-fit="onFitView"
|
||||
@zoom-in="onZoomIn"
|
||||
@zoom-out="onZoomOut"
|
||||
|
||||
Reference in New Issue
Block a user