UNPKG

@blockly/keyboard-navigation

Version:
79 lines 2.45 kB
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import * as Blockly from 'blockly/core'; /** * Bubble that displays a four-way arrow attached to a block to indicate that * it is in move mode. */ export declare class MoveIndicatorBubble implements Blockly.IBubble, Blockly.IRenderedElement { private sourceBlock; /** * Root SVG element for this bubble. */ svgRoot: SVGGElement; /** * The location of this bubble in workspace coordinates. */ location: Blockly.utils.Coordinate; /** * Creates a new move indicator bubble. * * @param sourceBlock The block this bubble should be associated with. */ constructor(sourceBlock: Blockly.BlockSvg); /** * Returns whether this bubble is movable by the user. * * @returns Always returns false. */ isMovable(): boolean; /** * Returns the root SVG element for this bubble. * * @returns The root SVG element. */ getSvgRoot(): SVGGElement; /** * Recalculates this bubble's location, keeping it adjacent to its block. */ updateLocation(): void; /** * Moves this bubble to the specified location. * * @param x The location on the X axis to move to. * @param y The location on the Y axis to move to. */ moveTo(x: number, y: number): void; /** * Returns this bubble's location in workspace coordinates. * * @returns The bubble's location. */ getRelativeToSurfaceXY(): Blockly.utils.Coordinate; /** * Disposes of this move indicator bubble. */ dispose(): void; showContextMenu(): void; setDragging(dragging: boolean): void; startDrag(event: PointerEvent): void; drag(newLocation: Blockly.utils.Coordinate, event: PointerEvent): void; moveDuringDrag(newLocation: Blockly.utils.Coordinate): void; endDrag(): void; revertDrag(): void; setDeleteStyle(enable: boolean): void; /** See IFocusableNode.getFocusableElement. */ getFocusableElement(): HTMLElement | SVGElement; /** See IFocusableNode.getFocusableTree. */ getFocusableTree(): Blockly.IFocusableTree; /** See IFocusableNode.onNodeFocus. */ onNodeFocus(): void; /** See IFocusableNode.onNodeBlur. */ onNodeBlur(): void; /** See IFocusableNode.canBeFocused. */ canBeFocused(): boolean; } //# sourceMappingURL=move_indicator.d.ts.map