sesaparcours
    Preparing search index...

    Fake class which should be extended to avoid inheriting static properties

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    autoClose: boolean

    Does the flyout automatically close when a block is created?

    CORNER_RADIUS: number

    Corner radius of the flyout background.

    GAP_X: any

    Gap between items in horizontal flyouts. Can be overridden with the "sep" element.

    GAP_Y: any

    Gap between items in vertical flyouts. Can be overridden with the "sep" element.

    horizontalLayout: boolean

    Whether the flyout should be laid out horizontally or not.

    id: string

    The unique id for this component that is used to register with the ComponentManager.

    MARGIN: number

    Margin around the edges of the blocks in the flyout.

    RTL: boolean

    Is RTL vs LTR.

    SCROLLBAR_MARGIN: number

    Top/bottom padding between scrollbar and edge of flyout background.

    targetWorkspace: WorkspaceSvg

    The target workspace

    Methods

    • Create a copy of this block on the workspace.

      Parameters

      Returns Blockly.BlockSvg

      The newly created block.

      if something went wrong with deserialization.

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

      Returns void

    • Returns the bounding rectangle of the drag target area in pixel units relative to viewport.

      Returns Blockly.utils.Rect

      The component's bounding box. Null if drag target area should be ignored.

    • Get the scale (zoom level) of the flyout. By default, this matches the target workspace scale, but this can be overridden.

      Returns number

      Flyout workspace scale.

    • Get the height of the flyout.

      Returns number

      The width of the flyout.

    • Get the width of the flyout.

      Returns number

      The width of the flyout.

    • Get the workspace inside the flyout.

      Returns WorkspaceSvg

      The workspace inside the flyout.

    • Calculates the x coordinate for the flyout position.

      Returns number

      X coordinate.

    • Calculates the y coordinate for the flyout position.

      Returns number

      Y coordinate.

    • Hide and empty the flyout.

      Returns void

    • Initializes the flyout.

      Parameters

      • targetWorkspace: WorkspaceSvg

        The workspace in which to create new blocks.

      Returns void

    • Does this flyout allow you to create a new instance of the given block? Used for deciding if a block can be "dragged out of" the flyout.

      Parameters

      Returns boolean

      True if you can create a new instance of the block, false otherwise.

    • Determine if a drag delta is toward the workspace, based on the position and orientation of the flyout. This is used in determineDragIntention_ to determine if a new block should be created or if the flyout should scroll.

      Parameters

      • currentDragDeltaXY: Blockly.utils.Coordinate

        How far the pointer has moved from the position at mouse down, in pixel units.

      Returns boolean

      True if the drag is toward the workspace.

    • Returns boolean

      True if this flyout may be scrolled with a scrollbar or by dragging.

    • Is the flyout visible?

      Returns boolean

      True if visible.

    • Handles when a cursor with a block or bubble enters this drag target.

      Parameters

      • _dragElement: IDraggable

        The block or bubble currently being dragged.

      Returns void

    • Handles when a cursor with a block or bubble exits this drag target.

      Parameters

      • _dragElement: IDraggable

        The block or bubble currently being dragged.

      Returns void

    • Handles when a cursor with a block or bubble is dragged over this drag target.

      Parameters

      • _dragElement: IDraggable

        The block or bubble currently being dragged.

      Returns void

    • Handles when a block or bubble is dropped on this component. Should not handle delete here.

      Parameters

      • _dragElement: IDraggable

        The block or bubble currently being dragged.

      Returns void

    • Move the flyout to the edge of the workspace.

      Returns void

    • Reflow blocks and their mats.

      Returns void

    • Scroll the flyout to the top.

      Returns void

    • Set whether this flyout's container is visible.

      Parameters

      • visible: boolean

        Whether the container is visible.

      Returns void

    • Set whether the flyout is visible. A value of true does not necessarily mean that the flyout is shown. It could be hidden because its container is hidden.

      Parameters

      • visible: boolean

        True if visible.

      Returns void

    • Returns whether the provided block or bubble should not be moved after being dropped on this component. If true, the element will return to where it was when the drag started.

      Parameters

      • _dragElement: IDraggable

        The block or bubble currently being dragged.

      Returns boolean

      Whether the block or bubble provided should be returned to drag start.

    • Show and populate the flyout.

      Parameters

      • flyoutDef: string | FlyoutDefinition

        Contents to display in the flyout. This is either an array of Nodes, a NodeList, a toolbox definition, or a string with the name of the dynamic category.

      Returns void

    • Returns whether the provided block or bubble would be deleted if dropped on this area. This method should check if the element is deletable and is always called before onDragEnter/onDragOver/onDragExit.

      Parameters

      • element: IDraggable

        The block or bubble currently being dragged.

      • couldConnect: boolean

        Whether the element could could connect to another.

      Returns boolean

      Whether the element provided would be deleted if dropped on this area.