PennController for IBEX › Forums › Support › Two-screen trials? › Reply To: Two-screen trials?
August 7, 2020 at 9:23 pm
#5902
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