Blockly.blockRendering. Debug
Constructor
Debug
new Debug(constants)
An object that renders rectangles and dots for debugging rendering code.
Parameter |
|
---|---|
constants |
Blockly.blockRendering.ConstantProvider The renderer's constants. Value must not be null. |
Property
config
non-null Object with boolean properties
Configuration object containing booleans to enable and disable debug rendering of specific rendering components.
Methods
clearElems
clearElems()
Remove all elements the this object created on the last pass.
drawBoundingBox
drawBoundingBox(info)
Draw a debug rectangle around the entire block.
Parameter |
|
---|---|
info |
Blockly.blockRendering.RenderInfo Rendering information about the block to debug. Value must not be null. |
drawConnection
drawConnection(conn)
Draw a circle at the location of the given connection. Inputs and outputs share the same colours, as do previous and next. When positioned correctly a connected pair will look like a bullseye.
Parameter |
|
---|---|
conn |
The connection to circle. |
drawDebug
drawDebug(block, info)
Do all of the work to draw debug information for the whole block.
Parameter |
|
---|---|
block |
The block to draw debug information for. Value must not be null. |
info |
Blockly.blockRendering.RenderInfo Rendering information about the block to debug. Value must not be null. |
drawRender
drawRender(svgPath)
Show a debug filter to highlight that a block has been rendered.
Parameter |
|
---|---|
svgPath |
SVGElement The block's svg path. Value must not be null. |
drawRenderedElem
drawRenderedElem(elem, isRtl)
Draw a debug rectangle for an in-row element.
Parameter |
|
---|---|
elem |
Blockly.blockRendering.Measurable The element to render. Value must not be null. |
isRtl |
boolean Whether the block is rendered RTL. |
drawRenderedRow
drawRenderedRow(row, cursorY, isRtl)
Draw a debug rectangle for a non-empty row.
Parameter |
|
---|---|
row |
The non-empty row to render. Value must not be null. |
cursorY |
number The y position of the top of the row. |
isRtl |
boolean Whether the block is rendered RTL. |
drawRowWithElements
drawRowWithElements(row, cursorY, isRtl)
Draw debug rectangles for a non-empty row and all of its subcomponents.
Parameter |
|
---|---|
row |
The non-empty row to render. Value must not be null. |
cursorY |
number The y position of the top of the row. |
isRtl |
boolean Whether the block is rendered RTL. |
drawSpacerElem
drawSpacerElem(elem, rowHeight, isRtl)
Draw a debug rectangle for a horizontal spacer.
Parameter |
|
---|---|
elem |
Blockly.blockRendering.InRowSpacer The spacer to render. Value must not be null. |
rowHeight |
number The height of the container row. |
isRtl |
boolean Whether the block is rendered RTL. |
drawSpacerRow
drawSpacerRow(row, cursorY, isRtl)
Draw a debug rectangle for a spacer (empty) row.
Parameter |
|
---|---|
row |
The row to render. Value must not be null. |
cursorY |
number The y position of the top of the row. |
isRtl |
boolean Whether the block is rendered RTL. |