Skip to content

Commit d465d1b

Browse files
committed
refactor(core): replace PanOnScrollMode
Signed-off-by: braks <[email protected]>
1 parent 3aff262 commit d465d1b

File tree

6 files changed

+6
-14
lines changed

6 files changed

+6
-14
lines changed

packages/core/src/container/Viewport/Viewport.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const transform = computed(() => `translate(${viewport.value.x}px,${viewport.val
1717

1818
<script lang="ts">
1919
export default {
20-
name: 'Transform',
20+
name: 'Viewport',
2121
compatConfig: { MODE: 3 },
2222
}
2323
</script>

packages/core/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,4 @@ export { VueFlowError, ErrorCode, isErrorOfType } from './utils/errors'
6969
export * from './types'
7070

7171
// todo: add more re-exports
72-
export { type Viewport } from '@xyflow/system'
72+
export { type Viewport, PanOnScrollMode } from '@xyflow/system'

packages/core/src/store/state.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { isMacOs } from '@xyflow/system'
1+
import { PanOnScrollMode, isMacOs } from '@xyflow/system'
22
import type { FlowOptions, State } from '../types'
3-
import { ConnectionLineType, ConnectionMode, PanOnScrollMode, SelectionMode } from '../types'
3+
import { ConnectionLineType, ConnectionMode, SelectionMode } from '../types'
44

55
import { createHooks } from './hooks'
66

packages/core/src/types/flow.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { CSSProperties } from 'vue'
22
import type { KeyFilter } from '@vueuse/core'
3-
import type { Viewport } from '@xyflow/system'
3+
import type { PanOnScrollMode, Viewport } from '@xyflow/system'
44
import type { VueFlowError } from '../utils'
55
import type { DefaultEdgeOptions, Edge, EdgeProps, EdgeUpdatable, GraphEdge } from './edge'
66
import type { CoordinateExtent, CoordinateExtentRange, GraphNode, Node, NodeProps } from './node'
@@ -13,7 +13,6 @@ import type {
1313
Connector,
1414
OnConnectStartParams,
1515
} from './connection'
16-
import type { PanOnScrollMode } from './zoom'
1716
import type { EdgeTypesObject, NodeTypesObject } from './components'
1817
import type { CustomEvent, EdgeMouseEvent, EdgeUpdateEvent, MouseTouchEvent, NodeDragEvent, NodeMouseEvent } from './hooks'
1918
import type { ValidConnectionFunc } from './handle'

packages/core/src/types/store.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { CSSProperties, ComputedRef, ToRefs } from 'vue'
22
import type { KeyFilter } from '@vueuse/core'
3-
import type { PanZoomInstance, Viewport } from '@xyflow/system'
3+
import type { PanOnScrollMode, PanZoomInstance, Viewport } from '@xyflow/system'
44
import type { ViewportHelper } from '../composables'
55
import type {
66
Dimensions,
@@ -28,7 +28,6 @@ import type {
2828
} from './connection'
2929
import type { DefaultEdgeOptions, Edge, EdgeUpdatable, GraphEdge } from './edge'
3030
import type { CoordinateExtent, CoordinateExtentRange, GraphNode, Node } from './node'
31-
import type { PanOnScrollMode } from './zoom'
3231
import type { CustomEvent, FlowHooks, FlowHooksEmit, FlowHooksOn } from './hooks'
3332
import type { EdgeChange, NodeChange, NodeDragItem } from './changes'
3433
import type { ConnectingHandle, ValidConnectionFunc } from './handle'

packages/core/src/types/zoom.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
import type { Viewport } from '@xyflow/system'
22
import type { Rect, XYPosition } from './flow'
33

4-
export enum PanOnScrollMode {
5-
Free = 'free',
6-
Vertical = 'vertical',
7-
Horizontal = 'horizontal',
8-
}
9-
104
export interface TransitionOptions {
115
duration?: number
126
}

0 commit comments

Comments
 (0)