Reply To: Image Issue

PennController for IBEX Forums Support Image Issue Reply To: Image Issue

#7469
Jeremy
Keymaster

Hi Ana,

The shuffle command actually re-prints elements that were shuffled, which can cause glitches for elements positioned relatively to another element. My suggestion is to have the shuffle command executed early on when the Canvas element is hidden, and only reveal that element later. Here is a rewrite of one of your two Template commands:

Template( "TestWordList.csv" , row =>
  newTrial("block1",
    newText("fix", "+") // create a fixation cross
        .css("font-size","80px")
        .print("center at 50%" , "center at 50%")
        .log()
    ,
    newTimer("fixtime",300).log().start().wait() // present the fixation cross 
    ,
    getText("fix").remove() // remove the fixation cross
    ,
    newImage("pic", row.Image1)
        .size(200,200)
        .print("center at 50vw", "center at 50vh")
    ,
    newCanvas("words", 820, 820)
        .add("center at 35%", "middle at 38%", newText("1",row.Word1).css("font-size", "40px") )
        .add("center at 65%", "middle at 38%", newText("unrel",row.Unrelated).css("font-size", "40px") )
        .hidden()
        .center()
        .print()
    ,
    newSelector("words")
        .disableClicks()
        .add( getText("1") , getText("unrel") )
    	.shuffle()
        .keys("F", "J")
    	.log()
    	.disable()
    ,
    newTimer("pictime",1000).log().start().wait()
    ,
    getImage("pic").remove()
    ,
    newTimer(50).start().wait()
    ,
    getCanvas("words").visible()
    ,
    getSelector("words").enable().wait()
  )
)

Note that I name and log the Timer elements rather than the visual elements (which are now printed early on) and I moved the keys command below the shuffle one, because I presume you want to preserve the left-F/right-J association

Jeremy