refactor(nodes)!: Remove draggable options, boolean only
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
+22
-2
@@ -1,3 +1,4 @@
|
||||
import { CSSProperties } from 'vue'
|
||||
import { ArrowHeadType, Position, Element } from './flow'
|
||||
import { GraphNode } from './node'
|
||||
|
||||
@@ -24,7 +25,14 @@ export interface GraphEdge<T = any> extends Edge<T> {
|
||||
targetNode: GraphNode
|
||||
}
|
||||
|
||||
export interface EdgeProps<T = any> extends GraphEdge<T> {
|
||||
export interface EdgeProps<Data = any> {
|
||||
id: string
|
||||
label?: string
|
||||
type?: string
|
||||
data?: Data
|
||||
class?: string
|
||||
style?: CSSProperties
|
||||
hidden?: boolean
|
||||
sourceX: number
|
||||
sourceY: number
|
||||
targetX: number
|
||||
@@ -35,9 +43,21 @@ export interface EdgeProps<T = any> extends GraphEdge<T> {
|
||||
markerEndId?: string
|
||||
sourceHandleId?: string
|
||||
targetHandleId?: string
|
||||
source: string
|
||||
target: string
|
||||
sourceHandle?: string
|
||||
targetHandle?: string
|
||||
labelStyle?: any
|
||||
labelShowBg?: boolean
|
||||
labelBgStyle?: any
|
||||
labelBgPadding?: [number, number]
|
||||
labelBgBorderRadius?: number
|
||||
animated?: boolean
|
||||
arrowHeadType?: ArrowHeadType
|
||||
updatable?: boolean
|
||||
}
|
||||
|
||||
export interface EdgeSmoothStepProps<T = any> extends EdgeProps<T> {
|
||||
export interface SmoothStepEdgeProps<T = any> extends EdgeProps<T> {
|
||||
borderRadius?: number
|
||||
}
|
||||
|
||||
|
||||
+1
-4
@@ -1,16 +1,13 @@
|
||||
import { DraggableOptions } from '@braks/revue-draggable'
|
||||
import { XYPosition, Position, SnapGrid, Element, XYZPosition, Dimensions } from './flow'
|
||||
import { HandleElement, ValidConnectionFunc } from './components'
|
||||
|
||||
export type CoordinateExtent = [[number, number], [number, number]]
|
||||
|
||||
export type Draggable = Omit<DraggableOptions, 'scale' | 'grid' | 'enableUserSelectHack' | 'enableTransformFix'> | boolean
|
||||
|
||||
export interface Node<T = any> extends Element<T> {
|
||||
position: XYPosition
|
||||
targetPosition?: Position
|
||||
sourcePosition?: Position
|
||||
draggable?: Draggable
|
||||
draggable?: boolean
|
||||
selectable?: boolean
|
||||
connectable?: boolean
|
||||
dragHandle?: string
|
||||
|
||||
Reference in New Issue
Block a user