standard.settings.left

getElement(id).settings.left() Makes the element appear horizontally aligned to the left (default). Note: the left means the left of the container of the element, not necessarily the left of the screen. Example: [js highlight=”10″ try=”true”]newText(“helloworld”, “Hello world”) .settings.right() .print() , newButton(“left”, “Align text to the left”) .print() .wait() , getText(“helloworld”) .settings.left() [/js] Prints Hello world onto …

standard.settings.hidden

getElement(id).settings.hidden() (since beta 0.3) Makes the element invisible. Note that when printed, a hidden element still occupies space on the page, but its content is not visible. Example: [js highlight=”5″ try=”true”]newText(“instruction”, “Guess what fruit is in the image below”) .print() , newImage(“fruit”, “pear.png”) .settings.hidden() .print() , newButton(“reveal”, “Reveal fruit”) .print() .wait() , getImage(“fruit”) .settings.visible() [/js] …

standard.settings.css

getElement(id).settings.css(“styleName”, “style”) or getElement(id).settings.css({“style name 1”: “style 1”, “style name 2”: “style 2″}) Applies the CSS style(s) to the element. Example: [js highlight=”2″ try=”true”] newText(“frame”, “framed”) .settings.css(“border”, “solid 1px black”) , newText(“sentence”, “The last word of this sentence is “) .settings.after( getText(“frame”) ) .print() [/js] Prints a text reading The last word of this sentence …

standard.settings.center

getElement(id).settings.center() Makes the element appear centered on the horizontal axis. Example: [js highlight=”2″ try=”true”] newText(“helloworld”, “Hello world”) .settings.center() .print() [/js] Prints Hello world onto the screen, horizontally centered.

standard.settings.before

or getElement(id).settings.before( getElement(id) ) Adds some content to the left of the element. Example: [js highlight=”6,12″ try=”true”] newImage(“bad”, “no.png”) , newImage(“good”, “ya.png”) , newText(“left label”, “Bad”) .settings.before( getImage(“bad”) ) , newText(“right label”, “Good”) .settings.after( getImage(“good”) ) , newScale(“judgment”, 5) .settings.before( getText(“left label”) ) .settings.after( getText(“right label”) ) .print() .wait() [/js] Creates two image and two …

standard.settings.after

getElement(id).settings.after( getElement(id) ) Adds some content to the right of the element. Example: [js highlight=”9,13″ try=”true”] newImage(“bad”, “no.png”) , newImage(“good”, “ya.png”) , newText(“left label”, “Bad”) .settings.before( getImage(“bad”) ) , newText(“right label”, “Good”) .settings.after( getImage(“good”) ) , newScale(“judgment”, 5) .settings.before( getText(“left label”) ) .settings.after( getText(“right label”) ) .print() .wait() [/js] Creates two image and two text …

standard.print

getElement(id).print() or getElement(id).print(x,y) (limited support in PennController 1.3, general since 1.4) or getElement(id).print(x,y,canvas) (limited support in PennController 1.3, general since 1.4) Adds the content of the element to the screen. This has no effect for non-visual elements such as the purely interactive . Since PennController 1.3, you can pass x and y values to print …

canvas.settings.add

getCanvas(id).settings.add( x, y, element ) or getCanvas(id).settings.add( “left at x”, “top at y”, element ) (since PennController 1.1) or getCanvas(id).settings.add( “center at x”, “middle at y”, element ) (since PennController 1.1) or getCanvas(id).settings.add( “right at x”, “bottom at y”, element ) (since PennController 1.1) Places element onto the canvas at the coordinates (x, y). Note …