import{_ as a,c as o,a0 as r,o as t}from"./chunks/framework.P9qPzDnn.js";const b=JSON.parse('{"title":"Interface: DraggableNodeOptions","description":"","frontmatter":{"editLink":false},"headers":[],"relativePath":"api/game/boards/board/interfaces/DraggableNodeOptions.md","filePath":"api/game/boards/board/interfaces/DraggableNodeOptions.md","lastUpdated":null}'),n={name:"api/game/boards/board/interfaces/DraggableNodeOptions.md"};function d(i,e,s,c,l,h){return t(),o("div",null,e[0]||(e[0]=[r('

Profectus / game/boards/board / DraggableNodeOptions

Interface: DraggableNodeOptions<T>

An object that configures a DraggableNode.

Type Parameters

T

Properties

board

board: Ref<any, any>

A ref to the specific instance of the Board vue component the node will be draggable on. Obtained by passing a suitable ref as the "ref" attribute to the Board component.

Defined in

profectus/src/game/boards/board.tsx:55


dropAreaRadius?

optional dropAreaRadius: NodeMaybeRefOrGetter<T, number, []>

The maximum distance (in pixels, before zoom) away a node can be and still drop onto a receiving node.

Defined in

profectus/src/game/boards/board.tsx:63


getPosition()

getPosition: (node) => NodePosition

Getter function to go from the node (typically ID) to the position of said node.

Parameters

node

T

Returns

NodePosition

Defined in

profectus/src/game/boards/board.tsx:57


onDrop()?

optional onDrop: (acceptingNode, draggingNode) => void

A callback for when a node gets dropped upon a receiving node.

Parameters

acceptingNode

T

draggingNode

T

Returns

void

Defined in

profectus/src/game/boards/board.tsx:65


receivingNodes?

optional receivingNodes: NodeMaybeRefOrGetter<T, T[], []>

A list of nodes that the currently dragged node can be dropped upon.

Defined in

profectus/src/game/boards/board.tsx:61


setPosition()

setPosition: (node, position) => void

Setter function to update the position of a node.

Parameters

node

T

position

NodePosition

Returns

void

Defined in

profectus/src/game/boards/board.tsx:59

',60)]))}const f=a(n,[["render",d]]);export{b as __pageData,f as default};