Public function

Sort by index.

Signature
function sortByIndex<
  T extends {
    index: string
  },
>(a: T, b: T): -1 | 0 | 1
Parameters
NameDescription

a

T

An object with an index property.

b

T

An object with an index property.

Returns
-1 | 0 | 1
Source

packages/editor/src/lib/utils/reordering/reordering.ts

SnapPointStadium2d