1 line
7.8 KiB
JavaScript
1 line
7.8 KiB
JavaScript
import{_ as a,c as o,a0 as r,o as t}from"./chunks/framework.P9qPzDnn.js";const b=JSON.parse('{"title":"Interface: DraggableNodeOptions<T>","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('<p><a href="./../../../../">Profectus</a> / <a href="./../">game/boards/board</a> / DraggableNodeOptions</p><h1 id="interface-draggablenodeoptions-t" tabindex="-1">Interface: DraggableNodeOptions<T> <a class="header-anchor" href="#interface-draggablenodeoptions-t" aria-label="Permalink to "Interface: DraggableNodeOptions\\<T\\>""></a></h1><p>An object that configures a <a href="./DraggableNode">DraggableNode</a>.</p><h2 id="type-parameters" tabindex="-1">Type Parameters <a class="header-anchor" href="#type-parameters" aria-label="Permalink to "Type Parameters""></a></h2><p>• <strong>T</strong></p><h2 id="properties" tabindex="-1">Properties <a class="header-anchor" href="#properties" aria-label="Permalink to "Properties""></a></h2><h3 id="board" tabindex="-1">board <a class="header-anchor" href="#board" aria-label="Permalink to "board""></a></h3><blockquote><p><strong>board</strong>: <a href="https://vuejs.org/guide/typescript/composition-api.html#typing-ref" target="_blank" rel="noreferrer"><code>Ref</code></a><<code>any</code>, <code>any</code>></p></blockquote><p>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.</p><h4 id="defined-in" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in" aria-label="Permalink to "Defined in""></a></h4><p><a href="https://code.incremental.social/profectus/Profectus/src/branch/main/src/game/boards/board.tsx#L55" target="_blank" rel="noreferrer">profectus/src/game/boards/board.tsx:55</a></p><hr><h3 id="droparearadius" tabindex="-1">dropAreaRadius? <a class="header-anchor" href="#droparearadius" aria-label="Permalink to "dropAreaRadius?""></a></h3><blockquote><p><code>optional</code> <strong>dropAreaRadius</strong>: <a href="./../type-aliases/NodeMaybeRefOrGetter"><code>NodeMaybeRefOrGetter</code></a><<code>T</code>, <code>number</code>, []></p></blockquote><p>The maximum distance (in pixels, before zoom) away a node can be and still drop onto a receiving node.</p><h4 id="defined-in-1" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-1" aria-label="Permalink to "Defined in""></a></h4><p><a href="https://code.incremental.social/profectus/Profectus/src/branch/main/src/game/boards/board.tsx#L63" target="_blank" rel="noreferrer">profectus/src/game/boards/board.tsx:63</a></p><hr><h3 id="getposition" tabindex="-1">getPosition() <a class="header-anchor" href="#getposition" aria-label="Permalink to "getPosition()""></a></h3><blockquote><p><strong>getPosition</strong>: (<code>node</code>) => <a href="./../type-aliases/NodePosition"><code>NodePosition</code></a></p></blockquote><p>Getter function to go from the node (typically ID) to the position of said node.</p><h4 id="parameters" tabindex="-1">Parameters <a class="header-anchor" href="#parameters" aria-label="Permalink to "Parameters""></a></h4><h5 id="node" tabindex="-1">node <a class="header-anchor" href="#node" aria-label="Permalink to "node""></a></h5><p><code>T</code></p><h4 id="returns" tabindex="-1">Returns <a class="header-anchor" href="#returns" aria-label="Permalink to "Returns""></a></h4><p><a href="./../type-aliases/NodePosition"><code>NodePosition</code></a></p><h4 id="defined-in-2" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-2" aria-label="Permalink to "Defined in""></a></h4><p><a href="https://code.incremental.social/profectus/Profectus/src/branch/main/src/game/boards/board.tsx#L57" target="_blank" rel="noreferrer">profectus/src/game/boards/board.tsx:57</a></p><hr><h3 id="ondrop" tabindex="-1">onDrop()? <a class="header-anchor" href="#ondrop" aria-label="Permalink to "onDrop()?""></a></h3><blockquote><p><code>optional</code> <strong>onDrop</strong>: (<code>acceptingNode</code>, <code>draggingNode</code>) => <code>void</code></p></blockquote><p>A callback for when a node gets dropped upon a receiving node.</p><h4 id="parameters-1" tabindex="-1">Parameters <a class="header-anchor" href="#parameters-1" aria-label="Permalink to "Parameters""></a></h4><h5 id="acceptingnode" tabindex="-1">acceptingNode <a class="header-anchor" href="#acceptingnode" aria-label="Permalink to "acceptingNode""></a></h5><p><code>T</code></p><h5 id="draggingnode" tabindex="-1">draggingNode <a class="header-anchor" href="#draggingnode" aria-label="Permalink to "draggingNode""></a></h5><p><code>T</code></p><h4 id="returns-1" tabindex="-1">Returns <a class="header-anchor" href="#returns-1" aria-label="Permalink to "Returns""></a></h4><p><code>void</code></p><h4 id="defined-in-3" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-3" aria-label="Permalink to "Defined in""></a></h4><p><a href="https://code.incremental.social/profectus/Profectus/src/branch/main/src/game/boards/board.tsx#L65" target="_blank" rel="noreferrer">profectus/src/game/boards/board.tsx:65</a></p><hr><h3 id="receivingnodes" tabindex="-1">receivingNodes? <a class="header-anchor" href="#receivingnodes" aria-label="Permalink to "receivingNodes?""></a></h3><blockquote><p><code>optional</code> <strong>receivingNodes</strong>: <a href="./../type-aliases/NodeMaybeRefOrGetter"><code>NodeMaybeRefOrGetter</code></a><<code>T</code>, <code>T</code>[], []></p></blockquote><p>A list of nodes that the currently dragged node can be dropped upon.</p><h4 id="defined-in-4" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-4" aria-label="Permalink to "Defined in""></a></h4><p><a href="https://code.incremental.social/profectus/Profectus/src/branch/main/src/game/boards/board.tsx#L61" target="_blank" rel="noreferrer">profectus/src/game/boards/board.tsx:61</a></p><hr><h3 id="setposition" tabindex="-1">setPosition() <a class="header-anchor" href="#setposition" aria-label="Permalink to "setPosition()""></a></h3><blockquote><p><strong>setPosition</strong>: (<code>node</code>, <code>position</code>) => <code>void</code></p></blockquote><p>Setter function to update the position of a node.</p><h4 id="parameters-2" tabindex="-1">Parameters <a class="header-anchor" href="#parameters-2" aria-label="Permalink to "Parameters""></a></h4><h5 id="node-1" tabindex="-1">node <a class="header-anchor" href="#node-1" aria-label="Permalink to "node""></a></h5><p><code>T</code></p><h5 id="position" tabindex="-1">position <a class="header-anchor" href="#position" aria-label="Permalink to "position""></a></h5><p><a href="./../type-aliases/NodePosition"><code>NodePosition</code></a></p><h4 id="returns-2" tabindex="-1">Returns <a class="header-anchor" href="#returns-2" aria-label="Permalink to "Returns""></a></h4><p><code>void</code></p><h4 id="defined-in-5" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-5" aria-label="Permalink to "Defined in""></a></h4><p><a href="https://code.incremental.social/profectus/Profectus/src/branch/main/src/game/boards/board.tsx#L59" target="_blank" rel="noreferrer">profectus/src/game/boards/board.tsx:59</a></p>',60)]))}const f=a(n,[["render",d]]);export{b as __pageData,f as default};
|