Contents

init(xUnit:yUnit:xMajorAlignment:yMajorAlignment:limitBehavior:)

Creates a scroll target behavior that aligns to values spaced at regular intervals along the scrollable axes.

Declaration

nonisolated init<X, Y>(xUnit: X, yUnit: Y, xMajorAlignment: MajorValueAlignment<X>? = nil, yMajorAlignment: MajorValueAlignment<Y>? = nil, limitBehavior: ValueAlignedLimitBehavior = .automatic) where X : Plottable, X : Numeric, Y : Plottable, Y : Numeric

Parameters

  • xUnit:

    The alignment unit for the x-axis.

  • yUnit:

    The alignment unit for the y-axis.

  • xMajorAlignment:

    The behavior for aligning to major values along the x-axis.

  • yMajorAlignment:

    The behavior for aligning to major values along the y-axis.

  • limitBehavior:

    The scroll limit behavior.