Skip to content

calculateNewPosition

reference
1 min readUpdated

Kind: Function

Source: atloria-monorepo/apps/web/src/components/Boards/helpers.ts

Given the current cards in a destination column (excluding the moved card) and the index where the card will land, compute its new float position.

Signature

ts
function calculateNewPosition(destCards: BoardCardData[], insertIndex: number): number

Parameters

NameType
destCardsBoardCardData[]
insertIndexnumber

Returns: number

Was this page helpful?

Download as PDF