Blockly. IBubble
A bubble interface.
Properties
dispose
Dispose of this bubble.
getRelativeToSurfaceXY
Return the coordinates of the top-left corner of this bubble's body relative to the drawing surface's origin (0,0), in workspace units.
- Returns
-
non-null Blockly.utils.Coordinate
Object with .x and .y properties.
getSvgRoot
Return the root node of the bubble's SVG group.
- Returns
-
non-null SVGElement
The root SVG node of the bubble's group.
isDeletable
Get whether this object is deletable or not.
- Inherited from
- Blockly.IDeletable#isDeletable
- Returns
-
True if deletable.
moveDuringDrag
Move this bubble during a drag, taking into account whether or not there is a drag surface.
Parameter |
|
---|---|
dragSurface |
The surface that carries rendered items during a drag, or null if no drag surface is in use. |
newLoc |
The location to translate to, in workspace coordinates. Value must not be null. |
moveTo
Move the bubble to the specified location in workspace coordinates.
Parameter |
|
---|---|
x |
number The x position to move to. |
y |
number The y position to move to. |
setAutoLayout
Set whether auto-layout of this bubble is enabled. The first time a bubble is shown it positions itself to not cover any blocks. Once a user has dragged it to reposition, it renders where the user put it.
Parameter |
|
---|---|
enable |
boolean True if auto-layout should be enabled, false otherwise. |
setDeleteStyle
Update the style of this bubble when it is dragged over a delete area.
Parameter |
|
---|---|
enable |
boolean True if the bubble is about to be deleted, false otherwise. |
setDragging
Triggers a move callback if one exists at the end of a drag.
Parameter |
|
---|---|
adding |
boolean True if adding, false if removing. |
showContextMenu
Show the context menu for this object.
Parameter |
|
---|---|
e |
Mouse event. Value must not be null. |
- Inherited from
- Blockly.IContextMenu#showContextMenu