profectus-docs/assets/api_game_boards_board_interfaces_MakeDraggableOptions.md.YNgCyzMn.js

1 line
11 KiB
JavaScript
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import{_ as a,c as r,a0 as o,o as t}from"./chunks/framework.P9qPzDnn.js";const b=JSON.parse('{"title":"Interface: MakeDraggableOptions<T>","description":"","frontmatter":{"editLink":false},"headers":[],"relativePath":"api/game/boards/board/interfaces/MakeDraggableOptions.md","filePath":"api/game/boards/board/interfaces/MakeDraggableOptions.md","lastUpdated":null}'),n={name:"api/game/boards/board/interfaces/MakeDraggableOptions.md"};function d(i,e,s,l,c,h){return t(),r("div",null,e[0]||(e[0]=[o('<p><a href="./../../../../">Profectus</a> / <a href="./../">game/boards/board</a> / MakeDraggableOptions</p><h1 id="interface-makedraggableoptions-t" tabindex="-1">Interface: MakeDraggableOptions&lt;T&gt; <a class="header-anchor" href="#interface-makedraggableoptions-t" aria-label="Permalink to &quot;Interface: MakeDraggableOptions\\&lt;T\\&gt;&quot;"></a></h1><p>An object that configures how to make a vue feature draggable using <a href="./../functions/makeDraggable">makeDraggable</a>.</p><h2 id="extended-by" tabindex="-1">Extended by <a class="header-anchor" href="#extended-by" aria-label="Permalink to &quot;Extended by&quot;"></a></h2><ul><li><a href="./Draggable"><code>Draggable</code></a></li></ul><h2 id="type-parameters" tabindex="-1">Type Parameters <a class="header-anchor" href="#type-parameters" aria-label="Permalink to &quot;Type Parameters&quot;"></a></h2><p>• <strong>T</strong></p><h2 id="properties" tabindex="-1">Properties <a class="header-anchor" href="#properties" aria-label="Permalink to &quot;Properties&quot;"></a></h2><h3 id="dragdelta" tabindex="-1">dragDelta <a class="header-anchor" href="#dragdelta" aria-label="Permalink to &quot;dragDelta&quot;"></a></h3><blockquote><p><strong>dragDelta</strong>: <a href="https://vuejs.org/guide/typescript/composition-api.html#typing-ref" target="_blank" rel="noreferrer"><code>Ref</code></a>&lt;<a href="./../type-aliases/NodePosition"><code>NodePosition</code></a>, <a href="./../type-aliases/NodePosition"><code>NodePosition</code></a>&gt;</p></blockquote><p>A reference to how far the node being dragged is from its initial position. Typically from <a href="./../functions/setupDraggableNode">setupDraggableNode</a>.</p><h4 id="defined-in" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in" aria-label="Permalink to &quot;Defined in&quot;"></a></h4><p><a href="https://code.incremental.social/profectus/Profectus/src/branch/main/src/game/boards/board.tsx#L245" target="_blank" rel="noreferrer">profectus/src/game/boards/board.tsx:245</a></p><hr><h3 id="enddrag" tabindex="-1">endDrag <a class="header-anchor" href="#enddrag" aria-label="Permalink to &quot;endDrag&quot;"></a></h3><blockquote><p><strong>endDrag</strong>: <code>VoidFunction</code></p></blockquote><p>A function to call when a drag is supposed to end. Typically from <a href="./../functions/setupDraggableNode">setupDraggableNode</a>.</p><h4 id="defined-in-1" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-1" aria-label="Permalink to &quot;Defined in&quot;"></a></h4><p><a href="https://code.incremental.social/profectus/Profectus/src/branch/main/src/game/boards/board.tsx#L249" target="_blank" rel="noreferrer">profectus/src/game/boards/board.tsx:249</a></p><hr><h3 id="hasdragged" tabindex="-1">hasDragged <a class="header-anchor" href="#hasdragged" aria-label="Permalink to &quot;hasDragged&quot;"></a></h3><blockquote><p><strong>hasDragged</strong>: <a href="https://vuejs.org/guide/typescript/composition-api.html#typing-ref" target="_blank" rel="noreferrer"><code>Ref</code></a>&lt;<code>boolean</code>, <code>boolean</code>&gt;</p></blockquote><p>A reference to whether or not the node being dragged has been moved away from its initial position. Typically from <a href="./../functions/setupDraggableNode">setupDraggableNode</a>.</p><h4 id="defined-in-2" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-2" aria-label="Permalink to &quot;Defined in&quot;"></a></h4><p><a href="https://code.incremental.social/profectus/Profectus/src/branch/main/src/game/boards/board.tsx#L243" target="_blank" rel="noreferrer">profectus/src/game/boards/board.tsx:243</a></p><hr><h3 id="id" tabindex="-1">id <a class="header-anchor" href="#id" aria-label="Permalink to &quot;id&quot;"></a></h3><blockquote><p><strong>id</strong>: <code>T</code></p></blockquote><p>The node ID to use for the vue feature.</p><h4 id="defined-in-3" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-3" aria-label="Permalink to &quot;Defined in&quot;"></a></h4><p><a href="https://code.incremental.social/profectus/Profectus/src/branch/main/src/game/boards/board.tsx#L239" target="_blank" rel="noreferrer">profectus/src/game/boards/board.tsx:239</a></p><hr><h3 id="initialposition" tabindex="-1">initialPosition? <a class="header-anchor" href="#initialposition" aria-label="Permalink to &quot;initialPosition?&quot;"></a></h3><blockquote><p><code>optional</code> <strong>initialPosition</strong>: <a href="./../type-aliases/NodePosition"><code>NodePosition</code></a></p></blockquote><p>The initial position of the node on the board. Defaults to (0, 0).</p><h4 id="defined-in-4" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-4" aria-label="Permalink to &quot;Defined in&quot;"></a></h4><p><a href="https://code.incremental.social/profectus/Profectus/src/branch/main/src/game/boards/board.tsx#L255" target="_blank" rel="noreferrer">profectus/src/game/boards/board.tsx:255</a></p><hr><h3 id="nodebeingdragged" tabindex="-1">nodeBeingDragged <a class="header-anchor" href="#nodebeingdragged" aria-label="Permalink to &quot;nodeBeingDragged&quot;"></a></h3><blockquote><p><strong>nodeBeingDragged</strong>: <a href="https://vuejs.org/guide/typescript/composition-api.html#typing-ref" target="_blank" rel="noreferrer"><code>Ref</code></a>&lt;<code>undefined</code> | <code>T</code>, <code>undefined</code> | <code>T</code>&gt;</p></blockquote><p>A reference to the current node being dragged, typically from <a href="./../functions/setupDraggableNode">setupDraggableNode</a>.</p><h4 id="defined-in-5" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-5" aria-label="Permalink to &quot;Defined in&quot;"></a></h4><p><a href="https://code.incremental.social/profectus/Profectus/src/branch/main/src/game/boards/board.tsx#L241" target="_blank" rel="noreferrer">profectus/src/game/boards/board.tsx:241</a></p><hr><h3 id="onmousedown" tabindex="-1">onMouseDown()? <a class="header-anchor" href="#onmousedown" aria-label="Permalink to &quot;onMouseDown()?&quot;"></a></h3><blockquote><p><code>optional</code> <strong>onMouseDown</strong>: (<code>e</code>) =&gt; <code>boolean</code> | <code>void</code></p></blockquote><p>A callback that&#39;s called when the element is pressed down. Fires before drag starts, and returning <code>false</code> will prevent the drag from happening.</p><h4 id="parameters" tabindex="-1">Parameters <a class="header-anchor" href="#parameters" aria-label="Permalink to &quot;Parameters&quot;"></a></h4><h5 id="e" tabindex="-1">e <a class="header-anchor" href="#e" aria-label="Permalink to &quot;e&quot;"></a></h5><p><a href="https://developer.mozilla.org/docs/Web/API/MouseEvent" target="_blank" rel="noreferrer"><code>MouseEvent</code></a> | <a href="https://developer.mozilla.org/docs/Web/API/TouchEvent" target="_blank" rel="noreferrer"><code>TouchEvent</code></a></p><h4 id="returns" tabindex="-1">Returns <a class="header-anchor" href="#returns" aria-label="Permalink to &quot;Returns&quot;"></a></h4><p><code>boolean</code> | <code>void</code></p><h4 id="defined-in-6" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-6" aria-label="Permalink to &quot;Defined in&quot;"></a></h4><p><a href="https://code.incremental.social/profectus/Profectus/src/branch/main/src/game/boards/board.tsx#L251" target="_blank" rel="noreferrer">profectus/src/game/boards/board.tsx:251</a></p><hr><h3 id="onmouseup" tabindex="-1">onMouseUp()? <a class="header-anchor" href="#onmouseup" aria-label="Permalink to &quot;onMouseUp()?&quot;"></a></h3><blockquote><p><code>optional</code> <strong>onMouseUp</strong>: (<code>e</code>) =&gt; <code>boolean</code> | <code>void</code></p></blockquote><p>A callback that&#39;s called when the mouse is lifted off the element.</p><h4 id="parameters-1" tabindex="-1">Parameters <a class="header-anchor" href="#parameters-1" aria-label="Permalink to &quot;Parameters&quot;"></a></h4><h5 id="e-1" tabindex="-1">e <a class="header-anchor" href="#e-1" aria-label="Permalink to &quot;e&quot;"></a></h5><p><a href="https://developer.mozilla.org/docs/Web/API/MouseEvent" target="_blank" rel="noreferrer"><code>MouseEvent</code></a> | <a href="https://developer.mozilla.org/docs/Web/API/TouchEvent" target="_blank" rel="noreferrer"><code>TouchEvent</code></a></p><h4 id="returns-1" tabindex="-1">Returns <a class="header-anchor" href="#returns-1" aria-label="Permalink to &quot;Returns&quot;"></a></h4><p><code>boolean</code> | <code>void</code></p><h4 id="defined-in-7" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-7" aria-label="Permalink to &quot;Defined in&quot;"></a></h4><p><a href="https://code.incremental.social/profectus/Profectus/src/branch/main/src/game/boards/board.tsx#L253" target="_blank" rel="noreferrer">profectus/src/game/boards/board.tsx:253</a></p><hr><h3 id="startdrag" tabindex="-1">startDrag() <a class="header-anchor" href="#startdrag" aria-label="Permalink to &quot;startDrag()&quot;"></a></h3><blockquote><p><strong>startDrag</strong>: (<code>e</code>, <code>id</code>) =&gt; <code>void</code></p></blockquote><p>A function to call when a drag is supposed to start. Typically from <a href="./../functions/setupDraggableNode">setupDraggableNode</a>.</p><h4 id="parameters-2" tabindex="-1">Parameters <a class="header-anchor" href="#parameters-2" aria-label="Permalink to &quot;Parameters&quot;"></a></h4><h5 id="e-2" tabindex="-1">e <a class="header-anchor" href="#e-2" aria-label="Permalink to &quot;e&quot;"></a></h5><p><a href="https://developer.mozilla.org/docs/Web/API/MouseEvent" target="_blank" rel="noreferrer"><code>MouseEvent</code></a> | <a href="https://developer.mozilla.org/docs/Web/API/TouchEvent" target="_blank" rel="noreferrer"><code>TouchEvent</code></a></p><h5 id="id-1" tabindex="-1">id <a class="header-anchor" href="#id-1" aria-label="Permalink to &quot;id&quot;"></a></h5><p><code>T</code></p><h4 id="returns-2" tabindex="-1">Returns <a class="header-anchor" href="#returns-2" aria-label="Permalink to &quot;Returns&quot;"></a></h4><p><code>void</code></p><h4 id="defined-in-8" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-8" aria-label="Permalink to &quot;Defined in&quot;"></a></h4><p><a href="https://code.incremental.social/profectus/Profectus/src/branch/main/src/game/boards/board.tsx#L247" target="_blank" rel="noreferrer">profectus/src/game/boards/board.tsx:247</a></p>',78)]))}const f=a(n,[["render",d]]);export{b as __pageData,f as default};