Class: BubbleDragger

Stay organized with collections Save and categorize content based on your preferences.

Constructor

BubbleDragger

new BubbleDragger(bubble, workspace)

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

package

dispose()

Sever all links from this object.

dragBubble

package

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

Blockly.utils.Coordinate

How far the pointer has moved from the position at the start of the drag, in pixel units.

Value must not be null.

endBubbleDrag

package

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

Blockly.utils.Coordinate

How far the pointer has moved from the position at the start of the drag, in pixel units.

Value must not be null.

startBubbleDrag

package

startBubbleDrag()

Start dragging a bubble. This includes moving it to the drag surface.