Skip to content

Type Alias: AlignmentStrategyType ​

ts
type AlignmentStrategyType = "auto" | "world" | "center" | "corner" | "overlap";

Defined in: src/display/alignment/AlignmentManager.ts:24

How layers that are not on the reference grid are placed.

  • 'world' (the ImageLayer default) draws each such layer at its true world position whenever its grid is an axis-aligned rescaling/shift of the reference grid (see registerGrid), slicing it on its own grid; any other layer falls back to the 'auto' heuristic.
  • 'auto' picks one of the heuristics below per layer. It was the default before 'world' and is the default of AlignmentManager.alignSprite.
  • 'center', 'corner' and 'overlap' fit the layer's slice bounds to the reference slice.

Released under the MIT License.