Image Issue

PennController for IBEX Forums Support Image Issue

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #7468
    topasnaa
    Participant

    Hi 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,
    Ana

    #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

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.