PennController for IBEX › Forums › Support › Image Issue
- This topic has 1 reply, 2 voices, and was last updated 3 years, 11 months ago by
Jeremy.
-
AuthorPosts
-
November 2, 2021 at 5:37 pm #7468
topasnaaParticipantHi Jeremy,
Our experiment is going well but we are having an issue where our words appear to come in from the left side of the screen when they are loading. Do you know what might be causing this?
Here is the link to the experiment: https://farm.pcibex.net/r/nOChMc/
Thank you,
AnaNovember 2, 2021 at 6:12 pm #7469
JeremyKeymasterHi Ana,
The
shufflecommand actually re-prints elements that were shuffled, which can cause glitches for elements positioned relatively to another element. My suggestion is to have theshufflecommand executed early on when the Canvas element is hidden, and only reveal that element later. Here is a rewrite of one of your twoTemplatecommands: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
logthe Timer elements rather than the visual elements (which are now printed early on) and I moved thekeyscommand below theshuffleone, because I presume you want to preserve the left-F/right-J associationJeremy
-
AuthorPosts
- You must be logged in to reply to this topic.