feat(nodes): Allow nodes to pass all draggable options
* omits scale, grid, enableuserselecthack and enabletransformfix as valid options for draggable * remove event interface and emits from nodewrapper Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
+2
-1
@@ -30,6 +30,7 @@ export interface NodeProps<T = any> {
|
||||
export type NodeComponent = Component<NodeProps> | DefineComponent<NodeProps, any, any, any, any> | string
|
||||
export type DefaultNodeTypes = { [key in 'input' | 'output' | 'default']: Component<NodeProps> }
|
||||
export type NodeTypes = (keyof DefaultNodeTypes | string)[]
|
||||
export type Draggable = Omit<DraggableOptions, 'scale' | 'grid' | 'enableUserSelectHack' | 'enableTransformFix'> | boolean
|
||||
|
||||
export interface Node<T = any> {
|
||||
id: ElementId
|
||||
@@ -41,7 +42,7 @@ export interface Node<T = any> {
|
||||
targetPosition?: Position
|
||||
sourcePosition?: Position
|
||||
isHidden?: boolean
|
||||
draggable?: boolean
|
||||
draggable?: Draggable
|
||||
selectable?: boolean
|
||||
connectable?: boolean
|
||||
dragHandle?: string
|
||||
|
||||
Reference in New Issue
Block a user