diff --git a/ivette/src/dome/renderer/newdnd.tsx b/ivette/src/dome/renderer/dnd.tsx similarity index 99% rename from ivette/src/dome/renderer/newdnd.tsx rename to ivette/src/dome/renderer/dnd.tsx index a4141dc312f96b5fe879a528efe43a0b931d8051..595f945099898e9fde8c43fdbc2282509460cc8f 100644 --- a/ivette/src/dome/renderer/newdnd.tsx +++ b/ivette/src/dome/renderer/dnd.tsx @@ -22,7 +22,7 @@ /** @packageDocumentation - @module dome/newdnd + @module dome/dnd @description D&D Facilities @@ -404,8 +404,8 @@ export function DragSource(props: DragSourceProps): JSX.Element { /** Swaps items at index i and j if they are both in range. */ export function swap<A>(ls: A[], a: number, b: number): A[] { const n = ls.length; - if (a === b || 0 > a || a >= n || 0 > b || b >= n) return ls ; - const [ i, j ] = a < b ? [ a, b ] : [ b, a ] ; + if (a === b || 0 > a || a >= n || 0 > b || b >= n) return ls; + const [i, j] = a < b ? [a, b] : [b, a]; return ls.slice(0, i).concat(ls.slice(i + 1, j + 1), ls[i], ls.slice(j + 1)); } diff --git a/ivette/src/sandbox/usednd.tsx b/ivette/src/sandbox/usednd.tsx index 3a6186474a35676b72bd4c4dde7edc5a212651ed..2a39966919984d68711987b460f9931bdb8a54fe 100644 --- a/ivette/src/sandbox/usednd.tsx +++ b/ivette/src/sandbox/usednd.tsx @@ -30,7 +30,7 @@ import { Label } from 'dome/controls/labels'; import { LCD } from 'dome/controls/displays'; import { Button } from 'dome/controls/buttons'; import * as Box from 'dome/layout/boxes'; -import * as DnD from 'dome/newdnd'; +import * as DnD from 'dome/dnd'; import { registerSandbox } from 'ivette'; import './sandbox.css';