Issue with newScale.settings.after()

PennController for IBEX Forums Support Issue with newScale.settings.after()

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #3612
    adamliter
    Participant

    In Google Chrome and Opera (and sometimes? Safari), there seems to be an issue with labeling a judgment scale. The spacing in those browsers (but not Firefox) causes the “after” label to show up on top of the scale itself. Here’s a 1-trial long example experiment that reproduces the issue. If you open it in Firefox, it display fine. If you open it in either Google Chrome or Opera, it will display incorrectly, with the text overlapping the scale.

    (It sometimes seems to be display incorrectly in Safari, but not always. I have no idea why the behavior would be inconsistent.)

    The issue seems to be that in Chrome, for example, the size of div with the class PennController-Scale PennController-judgment is computed as 131 pixels. (Even stranger is that the width of the table inside this div is computed to be 147 pixels.) On the other hand, in Firefox, the size of the div is computed to be 168 pixels (as is the table included inside of the div).

    I’m guessing this maybe has something to do with the use of relative units and fonts, but I haven’t looked at the PCIbex code, so I have no idea. That’s just a guess. Any suggestions on a good fix for this? Is there something that can be changed in PCIbex and/or is there a good short-term solution for me?

    Here’s the main.js file for the linked example experiment:

    PennController.ResetPrefix(null);
    
    PennController(
        defaultText
            .settings.center()
            .print()
        ,
        newText("sentence", "Ние щото отидохме със тримата ни братовчеда, на вечерята нямаше място за всички.")
        ,
        newText("my_clear", "<br/>")
        ,
        newScale("judgment", "1", "2", "3", "4", "5", "6", "7")
            .settings.log()
            .settings.labelsPosition("top")
            .settings.before(newText("bad", "very bad"))
            .settings.after(newText("good", "very good"))
            .settings.size("auto")
            .settings.center()
            .print()
            .wait()
        ,
        newTimer("delay", 250)
            .start()
            .wait()
    );
    • This topic was modified 4 years, 11 months ago by adamliter.
    #3616
    Jeremy
    Keymaster

    Hi!

    Thank you for reporting this issue, I’ll try to see what I can do about it.

    In the meantime, you can try to “play it safe” and use .settings.size(168) instead of .settings.size("auto").

    Jeremy

    #3644
    adamliter
    Participant

    Thanks, Jeremy! That workaround works for me.

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