sesaparcours
    Preparing search index...

    Fake class which should be extended to avoid inheriting static properties

    Hierarchy (View Summary)

    Index

    Constructors

    • Class for a pair of scrollbars. Horizontal and vertical.

      Parameters

      • workspace: WorkspaceSvg

        Workspace to bind the scrollbars to.

      • OptionaladdHorizontal: boolean

        Whether to add a horizontal scrollbar. Defaults to true.

      • OptionaladdVertical: boolean

        Whether to add a vertical scrollbar. Defaults to true.

      • Optionalopt_class: string

        A class to be applied to these scrollbars.

      • Optionalopt_margin: number

        The margin to apply to these scrollbars.

      Returns ScrollbarPair__Class

    Methods

    • Returns whether scrolling horizontally is enabled.

      Returns boolean

      True if horizontal scroll is enabled.

    • Returns whether scrolling vertically is enabled.

      Returns boolean

      True if vertical scroll is enabled.

    • Dispose of this pair of scrollbars. Unlink from all DOM elements to prevent memory leaks.

      Returns void

    • If any of the scrollbars are visible. Non-paired scrollbars may disappear when they aren't needed.

      Returns boolean

      True if visible.

    • Recalculate both of the scrollbars' locations and lengths. Also reposition the corner rectangle.

      Returns void

    • Recalculates the scrollbars' locations within their path and length. This should be called when the contents of the workspace have changed.

      Parameters

      • hostMetrics: Blockly.utils.Metrics

        A data structure describing all the required dimensions, possibly fetched from the host object.

      Returns void

    • Recalculates the scrollbars' locations on the screen and path length. This should be called when the layout or size of the window has changed.

      Parameters

      • hostMetrics: Blockly.utils.Metrics

        A data structure describing all the required dimensions, possibly fetched from the host object.

      Returns void

    • Set the handles of both scrollbars.

      Parameters

      • x: number

        The horizontal content displacement, relative to the view in pixels.

      • y: number

        The vertical content displacement, relative to the view in pixels.

      • updateMetrics: boolean

        Whether to update metrics on this set call. Defaults to true.

      Returns void

    • Set whether this scrollbar's container is visible.

      Parameters

      • visible: boolean

        Whether the container is visible.

      Returns void

    • Record the origin of the workspace that the scrollbar is in, in pixels relative to the injection div origin. This is for times when the scrollbar is used in an object whose origin isn't the same as the main workspace (e.g. in a flyout.)

      Parameters

      • x: number

        The x coordinate of the scrollbar's origin, in CSS pixels.

      • y: number

        The y coordinate of the scrollbar's origin, in CSS pixels.

      Returns void

    • Set the handle of the horizontal scrollbar to be at a certain position in CSS pixels relative to its parents.

      Parameters

      • x: number

        Horizontal scroll value.

      Returns void

    • Set the handle of the vertical scrollbar to be at a certain position in CSS pixels relative to its parents.

      Parameters

      • y: number

        Vertical scroll value.

      Returns void