Hierarchy

  • ScaleBarDimensions

Constructors

Properties

allowedSignificands: number[] = DEFAULT_ALLOWED_SIGNIFICANDS

Allowed significand values. 1 is not included, but is always considered part of the set.

lengthInPixels: number

Length that scale bar should be drawn, in pixels.

physicalBaseUnit: string

Base physical unit, e.g. "m" (for meters) or "s" (for seconds).

physicalLength: number

Physical length with which to label the scale bar.

physicalSizePerPixel: number = 0

Pixel size in base physical units.

physicalUnit: string
prevPhysicalSizePerPixel: number = 0
prevPhysicalUnit: string = '\0'
prevTargetLengthInPixels: number = 0
targetLengthInPixels: number = 0

The target length in pixels. The closest

Methods

  • Updates physicalLength, physicalUnit, and lengthInPixels to be the optimal values corresponding to targetLengthInPixels and physicalSizePerPixel.

    Returns

    true if the scale bar has changed, false if it is unchanged.

    Returns boolean

Generated using TypeDoc