Reply To: Two-screen trials?

PennController for IBEX Forums Support Two-screen trials? Reply To: Two-screen trials?

#5902
Jeremy
Keymaster

Calling remove on any element should remove it from the screen, however it was added. Example:

newTrial(
    newCanvas("container", 400, 400)
        .css('background-color','lightblue')
        .add( "center at 50%" , "middle at 50%" , newText("my text") )
        .print()
    ,
    newButton("remove text").print().wait().remove(),
    getText("my text").remove()
    ,
    newButton("remove canvas").print().wait().remove(),
    getCanvas("container").remove()
    ,
    newButton().wait()
)

Note that removing a Canvas will remove the elements it contains along with it

If you added a border to the Canvas through CSS, you can simply overwrite its border property using .css("border", "none") on the Canvas element

Jeremy