Class: MarkerSvg

Constructor

MarkerSvg

new MarkerSvg(workspace, constants, marker)

Class to draw a marker.

Parameter

workspace

Blockly.WorkspaceSvg

The workspace the marker belongs to.

Value must not be null.

constants

Blockly.blockRendering.ConstantProvider

The constants for the renderer.

Value must not be null.

marker

Blockly.Marker

The marker to draw.

Value must not be null.

Extends
Blockly.blockRendering.MarkerSvg

Properties

colour_

unknown

The colour of the marker.

Inherited from
Blockly.blockRendering.MarkerSvg#colour_

constants_

protected

unknown

The constants necessary to draw the marker.

Inherited from
Blockly.blockRendering.MarkerSvg#constants_

currentMarkerSvg

unknown

The current SVG element for the marker.

Inherited from
Blockly.blockRendering.MarkerSvg#currentMarkerSvg

Methods

applyColour_

protected

applyColour_()

Apply the marker's colour.

Inherited from
Blockly.zelos.MarkerSvg#applyColour_

createDom

package

createDom() returns SVGElement

Create the DOM element for the marker.

Inherited from
Blockly.blockRendering.MarkerSvg#createDom
Returns

The marker controls SVG group.

createDomInternal_

protected

createDomInternal_() returns Element

Create the marker SVG.

Inherited from
Blockly.zelos.MarkerSvg#createDomInternal_
Returns

The SVG node created.

dispose

package

dispose()

Dispose of this marker.

Inherited from
Blockly.blockRendering.MarkerSvg#dispose

draw

package

draw(oldNode, curNode)

Update the marker.

Parameter

oldNode

The previous node the marker was on or null.

curNode

The node that we want to draw the marker for.

Inherited from
Blockly.blockRendering.MarkerSvg#draw

getBlinkProperties_

protected

getBlinkProperties_() returns Object

Get the properties to make a marker blink.

Inherited from
Blockly.blockRendering.MarkerSvg#getBlinkProperties_
Returns

The object holding attributes to make the marker blink.

getSvgRoot

getSvgRoot() returns SVGElement

Return the root node of the SVG or null if none exists.

Inherited from
Blockly.blockRendering.MarkerSvg#getSvgRoot
Returns

The root SVG node.

hide

package

hide()

Hide the marker.

Inherited from
Blockly.zelos.MarkerSvg#hide

isCursor

isCursor() returns boolean

True if the marker should be drawn as a cursor, false otherwise. A cursor is drawn as a flashing line. A marker is drawn as a solid line.

Inherited from
Blockly.blockRendering.MarkerSvg#isCursor
Returns

True if the marker is a cursor, false otherwise.

positionLine_

protected

positionLine_(x, y, width)

Move and show the marker at the specified coordinate in workspace units. Displays a horizontal line.

Parameter

x

The new x, in workspace units.

y

The new y, in workspace units.

width

The new width, in workspace units.

Inherited from
Blockly.blockRendering.MarkerSvg#positionLine_

positionRect_

protected

positionRect_(x, y, width, height)

Move and show the marker at the specified coordinate in workspace units. Displays a filled in rectangle.

Parameter

x

The new x, in workspace units.

y

The new y, in workspace units.

width

The new width, in workspace units.

height

The new height, in workspace units.

Inherited from
Blockly.blockRendering.MarkerSvg#positionRect_

setParent_

protected

setParent_(newParent)

Attaches the SVG root of the marker to the SVG group of the parent.

Parameter

newParent

The workspace, field, or block that the marker SVG element should be attached to.

Inherited from
Blockly.blockRendering.MarkerSvg#setParent_

showAtLocation_

protected

showAtLocation_(curNode)

Update the marker's visible state based on the type of curNode..

Parameter

curNode

The node that we want to draw the marker for.

Inherited from
Blockly.zelos.MarkerSvg#showAtLocation_

showCurrent_

protected

showCurrent_()

Show the current marker.

Inherited from
Blockly.blockRendering.MarkerSvg#showCurrent_

showWithBlock_

showWithBlock_(curNode)

Draw a rectangle around the block.

Parameter

curNode

Blockly.ASTNode

The current node of the marker.

Value must not be null.

showWithBlockPrevOutput_

protected

showWithBlockPrevOutput_(block)

Show the marker as a combination of the previous connection and block, the output connection and block, or just the block.

Parameter

block

The block the marker is currently on.

Inherited from
Blockly.blockRendering.MarkerSvg#showWithBlockPrevOutput_

showWithCoordinates_

protected

showWithCoordinates_(curNode)

Show the visual representation of a workspace coordinate. This is a horizontal line.

Parameter

curNode

The node that we want to draw the marker for.

Value must not be null.

Inherited from
Blockly.blockRendering.MarkerSvg#showWithCoordinates_

showWithField_

protected

showWithField_(curNode)

Show the visual representation of a field. This is a box around the field.

Parameter

curNode

The node that we want to draw the marker for.

Value must not be null.

Inherited from
Blockly.blockRendering.MarkerSvg#showWithField_

showWithInput_

protected

showWithInput_(curNode)

Show the visual representation of an input. This is a puzzle piece.

Parameter

curNode

The node that we want to draw the marker for.

Value must not be null.

Inherited from
Blockly.zelos.MarkerSvg#showWithInput_

showWithNext_

protected

showWithNext_(curNode)

Show the visual representation of a next connection. This is a horizontal line.

Parameter

curNode

The node that we want to draw the marker for.

Value must not be null.

Inherited from
Blockly.blockRendering.MarkerSvg#showWithNext_

showWithStack_

protected

showWithStack_(curNode)

Show the visual representation of a stack. This is a box with extra padding around the entire stack of blocks.

Parameter

curNode

The node that we want to draw the marker for.

Value must not be null.

Inherited from
Blockly.blockRendering.MarkerSvg#showWithStack_