Class: BlockPyPrinter

BlockPyPrinter

new BlockPyPrinter(main, tag)

An object for managing the console where printing and plotting is outputed.
This:
Parameters:
Name Type Description
main Object The main BlockPy instance
tag HTMLElement The HTML object this is attached to.
Source:

Methods

getConfiguration() → {Object}

Update and return the current configuration of the printer. This involves calculating its size, among other operations.
Source:
Returns:
Returns an object with information about the printer.
Type
Object

print(lineText)

Print a successful line to the on-screen printer.
Parameters:
Name Type Description
lineText String A line of text to be printed out.
Source:

printHtml(html, value)

Prints a successful HTML blob to the printer. This is typically charts, but it can actually be any kind of HTML. This will probably be useful for doing Turtle and Processing stuff down the road.
Parameters:
Name Type Description
html HTML A blob of HTML to render in the tag
value Anything a value to push on the outputList for comparison. For instance, on charts this is typically the data of the chart.
Source:

resetPrinter()

Reset the status of the printer, including removing any text in it and fixing its size.
Source:

stepPrinter(step, page)

Updates each printed element in the printer and makes it hidden or visible, depending on what step we're on.
Parameters:
Name Type Description
step Number The current step of the executed program that we're on; each element in the printer must be marked with a "data-step" property to resolve this.
page Number Deprecated, not sure what this even does.
Source: