Skip to main content

Home > blockly > blockRendering > Renderer

blockRendering.Renderer class

The base class for a block renderer.

Signature:

export declare class Renderer implements IRegistrable 

Implements: IRegistrable

Constructors

ConstructorModifiersDescription
(constructor)(name)Constructs a new instance of the Renderer class

Properties

PropertyModifiersTypeDescription
constants_protectedConstantProviderThe renderer's constant provider.
nameprotectedstring
overridesprotectedobject | nullRendering constant overrides, passed in through options.

Methods

MethodModifiersDescription
dispose()Dispose of this renderer. Delete all DOM elements that this renderer and its constants created.
getClassName()Gets the class name that identifies this renderer.
getConstants()Get the current renderer's constant provider. We assume that when this is called, the renderer has already been initialized.
init(theme, opt_rendererOverrides)Initialize the renderer.
makeConstants_()protectedCreate a new instance of the renderer's constant provider.
makeDrawer_(block, info)protectedCreate a new instance of the renderer's drawer.
makePathObject(root, style)Create a new instance of a renderer path object.
makeRenderInfo_(block)protectedCreate a new instance of the renderer's render info object.
orphanCanConnectAtEnd(topBlock, orphanBlock, localType)protectedChecks if an orphaned block can connect to the "end" of the topBlock's block-clump. If the clump is a row the end is the last input. If the clump is a stack, the end is the last next connection. If the clump is neither, then this returns false.
refreshDom(svg, theme, injectionDivIfIsParent)Refresh the renderer after a theme change.
shouldHighlightConnection(_conn)Determine whether or not to highlight a connection.