Class: Renderer

Constructor

Renderer

new Renderer(name)

The minimalist renderer.

Parameter

name

string

The renderer name.

Extends
Blockly.blockRendering.Renderer

Property

name

package

unknown

The renderer name.

Inherited from
Blockly.blockRendering.Renderer#name

Methods

getConstants

package

getConstants() returns Blockly.blockRendering.ConstantProvider

Get the current renderer's constant provider. We assume that when this is called, the renderer has already been initialized.

Inherited from
Blockly.blockRendering.Renderer#getConstants
Returns

The constant provider.

init

package

init()

Initialize the renderer.

Inherited from
Blockly.blockRendering.Renderer#init

makeConstants_

protected

makeConstants_() returns Blockly.minimalist.ConstantProvider

Create a new instance of the renderer's constant provider.

Inherited from
Blockly.minimalist.Renderer#makeConstants_
Returns

The constant provider.

makeDebugger_

protected

makeDebugger_() returns Blockly.blockRendering.Debug

Create a new instance of the renderer's debugger.

Inherited from
Blockly.blockRendering.Renderer#makeDebugger_
Returns

The renderer debugger.

makeDrawer_

protected

makeDrawer_(block, info) returns Blockly.minimalist.Drawer

Create a new instance of the renderer's drawer.

Parameter

block

The block to render.

Value must not be null.

info

An object containing all information needed to render this block.

Value must not be null.

Inherited from
Blockly.minimalist.Renderer#makeDrawer_
Returns

The drawer.

makeMarkerDrawer

package

makeMarkerDrawer(workspace, marker) returns Blockly.blockRendering.MarkerSvg

Create a new instance of the renderer's marker drawer.

Parameter

workspace

The workspace the marker belongs to.

Value must not be null.

marker

The marker.

Value must not be null.

Inherited from
Blockly.blockRendering.Renderer#makeMarkerDrawer
Returns

The object in charge of drawing the marker.

makePathObject

package

makePathObject(root, style) returns Blockly.blockRendering.IPathObject

Create a new instance of a renderer path object.

Parameter

root

The root SVG element.

Value must not be null.

style

The style object to use for colouring.

Value must not be null.

Inherited from
Blockly.blockRendering.Renderer#makePathObject
Returns

The renderer path object.

makeRenderInfo_

protected

makeRenderInfo_(block) returns Blockly.minimalist.RenderInfo

Create a new instance of the renderer's render info object.

Parameter

block

The block to measure.

Value must not be null.

Inherited from
Blockly.minimalist.Renderer#makeRenderInfo_
Returns

The render info object.

render

package

render(block)

Render the block.

Parameter

block

The block to render.

Value must not be null.

Inherited from
Blockly.blockRendering.Renderer#render

shouldHighlightConnection

package

shouldHighlightConnection(_conn) returns boolean

Determine whether or not to highlight a connection.

Parameter

_conn

The connection to determine whether or not to highlight.

Inherited from
Blockly.blockRendering.Renderer#shouldHighlightConnection
Returns

True if we should highlight the connection.

shouldInsertDraggedBlock

package

shouldInsertDraggedBlock(block, conn) returns boolean

Determine whether or not to insert a dragged block into a stack.

Parameter

block

The target block.

Value must not be null.

conn

The closest connection.

Value must not be null.

Inherited from
Blockly.blockRendering.Renderer#shouldInsertDraggedBlock
Returns

True if we should insert the dragged block into the stack.