Merge branch 'next' into feat/dragedge
This commit is contained in:
+28
-1
@@ -204,7 +204,7 @@ export interface WrapNodeProps {
|
||||
type: string;
|
||||
data: any;
|
||||
selected: boolean;
|
||||
transform: Transform;
|
||||
scale: number;
|
||||
xPos: number;
|
||||
yPos: number;
|
||||
isSelectable: boolean;
|
||||
@@ -227,13 +227,22 @@ export interface WrapNodeProps {
|
||||
snapToGrid?: boolean;
|
||||
snapGrid?: SnapGrid;
|
||||
isDragging?: boolean;
|
||||
resizeObserver: ResizeObserver;
|
||||
}
|
||||
|
||||
export type FitViewParams = {
|
||||
padding: number;
|
||||
};
|
||||
|
||||
export type FlowExportObject = {
|
||||
elements: Elements;
|
||||
position: [number, number];
|
||||
zoom: number;
|
||||
};
|
||||
|
||||
export type FitViewFunc = (fitViewOptions?: FitViewParams) => void;
|
||||
export type ProjectFunc = (position: XYPosition) => XYPosition;
|
||||
export type ToObjectFunc = () => FlowExportObject;
|
||||
|
||||
export type OnLoadParams = {
|
||||
zoomIn: () => void;
|
||||
@@ -243,6 +252,7 @@ export type OnLoadParams = {
|
||||
project: ProjectFunc;
|
||||
getElements: () => Elements;
|
||||
setTransform: (transform: FlowTransform) => void;
|
||||
toObject: ToObjectFunc;
|
||||
};
|
||||
|
||||
export type OnLoadFunc = (params: OnLoadParams) => void;
|
||||
@@ -324,4 +334,21 @@ export type FlowTransform = {
|
||||
|
||||
export type TranslateExtent = [[number, number], [number, number]];
|
||||
|
||||
export type KeyCode = number | string;
|
||||
|
||||
export enum PanOnScrollMode {
|
||||
Free = 'free',
|
||||
Vertical = 'vertical',
|
||||
Horizontal = 'horizontal',
|
||||
}
|
||||
|
||||
export interface ZoomPanHelperFunctions {
|
||||
zoomIn: () => void;
|
||||
zoomOut: () => void;
|
||||
zoomTo: (zoomLevel: number) => void;
|
||||
transform: (transform: FlowTransform) => void;
|
||||
fitView: (params?: FitViewParams) => void;
|
||||
initialized: boolean;
|
||||
}
|
||||
|
||||
export type OnEdgeUpdateFunc = (oldEdge: Edge, newConnection: Connection) => void;
|
||||
|
||||
Reference in New Issue
Block a user