Skip to content
sigma.js sigma.js
v4.0.6 Docs Examples GitHub 12.2K

packItemsOnPage

packItemsOnPage(items, ctx, cursor, margin?): object

Defined in: packages/sigma/src/utils/shelf-atlas.ts:50

Packs as many items as possible into a single canvas using a shelf (row) algorithm. Items that don’t fit are returned in remaining.

PackableItem[]

CanvasRenderingContext2D

ShelfCursor

number = MARGIN

object

atlas: AtlasLookup

cursor: ShelfCursor

remaining: PackableItem[]