Blockly. BubbleDragger
Constructor
BubbleDragger
new BubbleDragger(bubble, workspace)
Class for a bubble dragger. It moves things on the bubble canvas around the workspace when they are being dragged by a mouse or touch. These can be block comments, mutators, warnings, or workspace comments.
Parameter |
|
---|---|
bubble |
The item on the bubble canvas to drag. Value must not be null. |
workspace |
The workspace to drag on. Value must not be null. |
Property
draggingBubble_
non-null Blockly.WorkspaceCommentSvg
Methods
dispose
dispose()
Sever all links from this object.
dragBubble
dragBubble(e, currentDragDeltaXY)
Execute a step of bubble dragging, based on the given event. Update the display accordingly.
Parameter |
|
---|---|
e |
Event The most recent move event. Value must not be null. |
currentDragDeltaXY |
How far the pointer has moved from the position at the start of the drag, in pixel units. Value must not be null. |
endBubbleDrag
endBubbleDrag(e, currentDragDeltaXY)
Finish a bubble drag and put the bubble back on the workspace.
Parameter |
|
---|---|
e |
Event The mouseup/touchend event. Value must not be null. |
currentDragDeltaXY |
How far the pointer has moved from the position at the start of the drag, in pixel units. Value must not be null. |
startBubbleDrag
startBubbleDrag()
Start dragging a bubble. This includes moving it to the drag surface.