chore: lint files
Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
@@ -25,114 +25,116 @@ export const defaultEdgeTypes: DefaultEdgeTypes = {
|
||||
simplebezier: SimpleBezierEdge,
|
||||
}
|
||||
|
||||
const defaultState = (): State => ({
|
||||
vueFlowRef: null,
|
||||
viewportRef: null,
|
||||
nodes: [],
|
||||
edges: [],
|
||||
nodeTypes: {},
|
||||
edgeTypes: {},
|
||||
function defaultState(): State {
|
||||
return {
|
||||
vueFlowRef: null,
|
||||
viewportRef: null,
|
||||
nodes: [],
|
||||
edges: [],
|
||||
nodeTypes: {},
|
||||
edgeTypes: {},
|
||||
|
||||
initialized: false,
|
||||
initialized: false,
|
||||
|
||||
dimensions: {
|
||||
width: 0,
|
||||
height: 0,
|
||||
},
|
||||
viewport: { x: 0, y: 0, zoom: 1 },
|
||||
dimensions: {
|
||||
width: 0,
|
||||
height: 0,
|
||||
},
|
||||
viewport: { x: 0, y: 0, zoom: 1 },
|
||||
|
||||
d3Zoom: null,
|
||||
d3Selection: null,
|
||||
d3ZoomHandler: null,
|
||||
minZoom: 0.5,
|
||||
maxZoom: 2,
|
||||
d3Zoom: null,
|
||||
d3Selection: null,
|
||||
d3ZoomHandler: null,
|
||||
minZoom: 0.5,
|
||||
maxZoom: 2,
|
||||
|
||||
translateExtent: [
|
||||
[Number.NEGATIVE_INFINITY, Number.NEGATIVE_INFINITY],
|
||||
[Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY],
|
||||
],
|
||||
nodeExtent: [
|
||||
[Number.NEGATIVE_INFINITY, Number.NEGATIVE_INFINITY],
|
||||
[Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY],
|
||||
],
|
||||
translateExtent: [
|
||||
[Number.NEGATIVE_INFINITY, Number.NEGATIVE_INFINITY],
|
||||
[Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY],
|
||||
],
|
||||
nodeExtent: [
|
||||
[Number.NEGATIVE_INFINITY, Number.NEGATIVE_INFINITY],
|
||||
[Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY],
|
||||
],
|
||||
|
||||
selectionMode: SelectionMode.Full,
|
||||
paneDragging: false,
|
||||
preventScrolling: true,
|
||||
zoomOnScroll: true,
|
||||
zoomOnPinch: true,
|
||||
zoomOnDoubleClick: true,
|
||||
panOnScroll: false,
|
||||
panOnScrollSpeed: 0.5,
|
||||
panOnScrollMode: PanOnScrollMode.Free,
|
||||
panOnDrag: true,
|
||||
edgeUpdaterRadius: 10,
|
||||
onlyRenderVisibleElements: false,
|
||||
defaultViewport: { x: 0, y: 0, zoom: 1 },
|
||||
selectionMode: SelectionMode.Full,
|
||||
paneDragging: false,
|
||||
preventScrolling: true,
|
||||
zoomOnScroll: true,
|
||||
zoomOnPinch: true,
|
||||
zoomOnDoubleClick: true,
|
||||
panOnScroll: false,
|
||||
panOnScrollSpeed: 0.5,
|
||||
panOnScrollMode: PanOnScrollMode.Free,
|
||||
panOnDrag: true,
|
||||
edgeUpdaterRadius: 10,
|
||||
onlyRenderVisibleElements: false,
|
||||
defaultViewport: { x: 0, y: 0, zoom: 1 },
|
||||
|
||||
nodesSelectionActive: false,
|
||||
userSelectionActive: false,
|
||||
nodesSelectionActive: false,
|
||||
userSelectionActive: false,
|
||||
|
||||
userSelectionRect: null,
|
||||
userSelectionRect: null,
|
||||
|
||||
defaultMarkerColor: '#b1b1b7',
|
||||
connectionLineStyle: {},
|
||||
connectionLineType: null,
|
||||
connectionLineOptions: {
|
||||
type: ConnectionLineType.Bezier,
|
||||
style: {},
|
||||
},
|
||||
connectionMode: ConnectionMode.Loose,
|
||||
connectionStartHandle: null,
|
||||
connectionClickStartHandle: null,
|
||||
connectionPosition: { x: NaN, y: NaN },
|
||||
connectionRadius: 20,
|
||||
connectOnClick: true,
|
||||
connectionStatus: null,
|
||||
isValidConnection: null,
|
||||
defaultMarkerColor: '#b1b1b7',
|
||||
connectionLineStyle: {},
|
||||
connectionLineType: null,
|
||||
connectionLineOptions: {
|
||||
type: ConnectionLineType.Bezier,
|
||||
style: {},
|
||||
},
|
||||
connectionMode: ConnectionMode.Loose,
|
||||
connectionStartHandle: null,
|
||||
connectionClickStartHandle: null,
|
||||
connectionPosition: { x: NaN, y: NaN },
|
||||
connectionRadius: 20,
|
||||
connectOnClick: true,
|
||||
connectionStatus: null,
|
||||
isValidConnection: null,
|
||||
|
||||
snapGrid: [15, 15],
|
||||
snapToGrid: false,
|
||||
snapGrid: [15, 15],
|
||||
snapToGrid: false,
|
||||
|
||||
edgesUpdatable: false,
|
||||
edgesFocusable: true,
|
||||
nodesFocusable: true,
|
||||
nodesConnectable: true,
|
||||
nodesDraggable: true,
|
||||
elementsSelectable: true,
|
||||
selectNodesOnDrag: true,
|
||||
multiSelectionActive: false,
|
||||
selectionKeyCode: 'Shift',
|
||||
multiSelectionKeyCode: 'Meta',
|
||||
zoomActivationKeyCode: 'Meta',
|
||||
deleteKeyCode: 'Backspace',
|
||||
panActivationKeyCode: 'Space',
|
||||
edgesUpdatable: false,
|
||||
edgesFocusable: true,
|
||||
nodesFocusable: true,
|
||||
nodesConnectable: true,
|
||||
nodesDraggable: true,
|
||||
elementsSelectable: true,
|
||||
selectNodesOnDrag: true,
|
||||
multiSelectionActive: false,
|
||||
selectionKeyCode: 'Shift',
|
||||
multiSelectionKeyCode: 'Meta',
|
||||
zoomActivationKeyCode: 'Meta',
|
||||
deleteKeyCode: 'Backspace',
|
||||
panActivationKeyCode: 'Space',
|
||||
|
||||
hooks: createHooks(),
|
||||
hooks: createHooks(),
|
||||
|
||||
applyDefault: true,
|
||||
autoConnect: false,
|
||||
applyDefault: true,
|
||||
autoConnect: false,
|
||||
|
||||
fitViewOnInit: false,
|
||||
noDragClassName: 'nodrag',
|
||||
noWheelClassName: 'nowheel',
|
||||
noPanClassName: 'nopan',
|
||||
defaultEdgeOptions: undefined,
|
||||
elevateEdgesOnSelect: false,
|
||||
elevateNodesOnSelect: true,
|
||||
fitViewOnInit: false,
|
||||
noDragClassName: 'nodrag',
|
||||
noWheelClassName: 'nowheel',
|
||||
noPanClassName: 'nopan',
|
||||
defaultEdgeOptions: undefined,
|
||||
elevateEdgesOnSelect: false,
|
||||
elevateNodesOnSelect: true,
|
||||
|
||||
autoPanOnNodeDrag: true,
|
||||
autoPanOnConnect: true,
|
||||
autoPanOnNodeDrag: true,
|
||||
autoPanOnConnect: true,
|
||||
|
||||
disableKeyboardA11y: false,
|
||||
ariaLiveMessage: '',
|
||||
disableKeyboardA11y: false,
|
||||
ariaLiveMessage: '',
|
||||
|
||||
__experimentalFeatures: {
|
||||
nestedFlow: false,
|
||||
},
|
||||
__experimentalFeatures: {
|
||||
nestedFlow: false,
|
||||
},
|
||||
|
||||
vueFlowVersion: typeof __VUE_FLOW_VERSION__ !== 'undefined' ? __VUE_FLOW_VERSION__ : '-',
|
||||
})
|
||||
vueFlowVersion: typeof __VUE_FLOW_VERSION__ !== 'undefined' ? __VUE_FLOW_VERSION__ : '-',
|
||||
}
|
||||
}
|
||||
|
||||
export function useState(opts?: FlowOptions): State {
|
||||
const state = defaultState()
|
||||
|
||||
Reference in New Issue
Block a user