refactor(core): merge defaultZoom & defaultPosition to defaultViewport
Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
@@ -11,8 +11,7 @@ const {
|
|||||||
id,
|
id,
|
||||||
minZoom,
|
minZoom,
|
||||||
maxZoom,
|
maxZoom,
|
||||||
defaultZoom,
|
defaultViewport,
|
||||||
defaultPosition,
|
|
||||||
translateExtent,
|
translateExtent,
|
||||||
dimensions,
|
dimensions,
|
||||||
zoomActivationKeyCode,
|
zoomActivationKeyCode,
|
||||||
|
|||||||
@@ -66,8 +66,7 @@ const defaultState = (): State => ({
|
|||||||
panOnDrag: true,
|
panOnDrag: true,
|
||||||
edgeUpdaterRadius: 10,
|
edgeUpdaterRadius: 10,
|
||||||
onlyRenderVisibleElements: false,
|
onlyRenderVisibleElements: false,
|
||||||
defaultZoom: 1,
|
defaultViewport: { x: 0, y: 0, zoom: 1 },
|
||||||
defaultPosition: [0, 0],
|
|
||||||
|
|
||||||
nodesSelectionActive: false,
|
nodesSelectionActive: false,
|
||||||
userSelectionActive: false,
|
userSelectionActive: false,
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import type { KeyFilter } from '@vueuse/core'
|
|||||||
import type { DefaultEdgeOptions, Edge, EdgeUpdatable, GraphEdge } from './edge'
|
import type { DefaultEdgeOptions, Edge, EdgeUpdatable, GraphEdge } from './edge'
|
||||||
import type { CoordinateExtent, GraphNode, Node } from './node'
|
import type { CoordinateExtent, GraphNode, Node } from './node'
|
||||||
import type { ConnectionLineOptions, ConnectionLineType, ConnectionMode, Connector } from './connection'
|
import type { ConnectionLineOptions, ConnectionLineType, ConnectionMode, Connector } from './connection'
|
||||||
import type { PanOnScrollMode } from './zoom'
|
import type { PanOnScrollMode, Viewport } from './zoom'
|
||||||
import type { EdgeTypesObject, NodeTypesObject } from './components'
|
import type { EdgeTypesObject, NodeTypesObject } from './components'
|
||||||
import type { CustomEvent } from './hooks'
|
import type { CustomEvent } from './hooks'
|
||||||
|
|
||||||
@@ -129,8 +129,7 @@ export interface FlowProps {
|
|||||||
panOnDrag?: boolean
|
panOnDrag?: boolean
|
||||||
minZoom?: number
|
minZoom?: number
|
||||||
maxZoom?: number
|
maxZoom?: number
|
||||||
defaultZoom?: number
|
defaultViewport?: Viewport
|
||||||
defaultPosition?: [number, number]
|
|
||||||
translateExtent?: CoordinateExtent
|
translateExtent?: CoordinateExtent
|
||||||
nodeExtent?: CoordinateExtent
|
nodeExtent?: CoordinateExtent
|
||||||
defaultMarkerColor?: string
|
defaultMarkerColor?: string
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ export interface State extends Omit<FlowOptions, 'id' | 'modelValue'> {
|
|||||||
minZoom: number
|
minZoom: number
|
||||||
/** use setMaxZoom action to change maxZoom */
|
/** use setMaxZoom action to change maxZoom */
|
||||||
maxZoom: number
|
maxZoom: number
|
||||||
defaultZoom: number
|
defaultViewport: Viewport
|
||||||
/** use setTranslateExtent action to change translateExtent */
|
/** use setTranslateExtent action to change translateExtent */
|
||||||
translateExtent: CoordinateExtent
|
translateExtent: CoordinateExtent
|
||||||
nodeExtent: CoordinateExtent
|
nodeExtent: CoordinateExtent
|
||||||
@@ -59,8 +59,6 @@ export interface State extends Omit<FlowOptions, 'id' | 'modelValue'> {
|
|||||||
readonly viewport: Viewport
|
readonly viewport: Viewport
|
||||||
/** if true will skip rendering any elements currently not inside viewport until they become visible */
|
/** if true will skip rendering any elements currently not inside viewport until they become visible */
|
||||||
onlyRenderVisibleElements: boolean
|
onlyRenderVisibleElements: boolean
|
||||||
defaultPosition: [number, number]
|
|
||||||
|
|
||||||
nodesSelectionActive: boolean
|
nodesSelectionActive: boolean
|
||||||
userSelectionActive: boolean
|
userSelectionActive: boolean
|
||||||
multiSelectionActive: boolean
|
multiSelectionActive: boolean
|
||||||
|
|||||||
Reference in New Issue
Block a user