sesaparcours
    Preparing search index...

    Fake class which should be extended to avoid inheriting static properties

    Hierarchy (View Summary)

    Index

    Constructors

    • Class for a pure SVG scrollbar. This technique offers a scrollbar that is guaranteed to work, but may not look or behave like the system's scrollbars.

      Parameters

      • workspace: WorkspaceSvg

        Workspace to bind the scrollbar to.

      • horizontal: boolean

        True if horizontal, false if vertical.

      • Optionalopt_pair: boolean

        True if scrollbar is part of a horiz/vert pair.

      • Optionalopt_class: string

        A class to be applied to this scrollbar.

      • Optionalopt_margin: number

        The margin to apply to this scrollbar.

      Returns Blockly.Scrollbar

    Properties

    The upper left corner of the scrollbar's SVG group in CSS pixels relative to the scrollbar's origin. This is usually relative to the injection div origin.

    ratio: number

    The ratio of handle position offset to workspace content displacement.

    Methods

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

      Returns void

    • Is the scrollbar visible. Non-paired scrollbars disappear when they aren't needed.

      Returns boolean

      True if visible.

    • Recalculate the scrollbar's location and its length.

      Parameters

      • Optionalopt_metrics: Blockly.utils.Metrics

        A data structure of from the describing all the required dimensions. If not provided, it will be fetched from the host object.

      Returns void

    • Recalculate a horizontal scrollbar's location within its 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

    • Recalculate a vertical scrollbar's location within its 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

    • Recalculate a horizontal scrollbar's location 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

    • Recalculate a vertical scrollbar's location 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 scrollbar handle's position.

      Parameters

      • value: number

        The content displacement, relative to the view in pixels.

      • OptionalupdateMetrics: boolean

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

      Returns void

    • Set whether the scrollbar's container is visible and update display accordingly if visibility has changed.

      Parameters

      • visible: boolean

        Whether the container is visible

      Returns void

    • Set the offset of the scrollbar's handle from the scrollbar's position, and change the SVG attribute accordingly.

      Parameters

      • newPosition: number

        The new scrollbar handle offset in CSS pixels.

      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 position of the scrollbar's SVG group in CSS pixels relative to the scrollbar's origin. This sets the scrollbar's location within the workspace.

      Parameters

      • x: number

        The new x coordinate.

      • y: number

        The new y coordinate.

      Returns void

    • Set whether the scrollbar is visible. Only applies to non-paired scrollbars.

      Parameters

      • visible: boolean

        True if visible.

      Returns void

    • Update visibility of scrollbar based on whether it thinks it should be visible and whether its containing workspace is visible. We cannot rely on the containing workspace being hidden to hide us because it is not necessarily our parent in the DOM.

      Returns void