PennController for IBEX › Forums › Support › Modifying size of and distance between multiple choice buttons on a scale
- This topic has 5 replies, 2 voices, and was last updated 2 years, 4 months ago by Eva.
-
AuthorPosts
-
June 8, 2022 at 2:32 pm #8228EvaParticipant
Hi! I’m having trouble with a scale element.
My scale consists of five elements in a row, labelled 1 to 5. Participants should select one. The problem is that I have received feedback from my beta testers that when you access the experiment on a small screen like a phone, you often accidentally click not on the number you actually meant but on another one next to it. In other words, the buttons are too small / too close to each other / people’s fingers are too big.
Is there a way of modifying the size and position of the buttons? I’ve tried .setting.size() but that doesn’t seem to have an impact.
Here’s the critical bit of my code:
newTrial("critical", newText("sent", variable.Sentence) .center() .print() , newText(" ") .print() , newScale("rating","1", "2", "3", "4", "5") .before( newText("left", "Völlig ungrammatisch") ) .after( newText("right", "Völlig grammatisch") ) .log() .center() .labelsPosition("bottom") .print() .wait() )
And here is a demo link to the (unpublished) experiment: https://farm.pcibex.net/r/qjgSxQ/
Thanks a bunch! Let me know if you need any other info.
June 8, 2022 at 3:12 pm #8229JeremyKeymasterHi,
You can add CSS rules to Aesthetics/global_main.css to control the visual rendering of your Scale element. See this post
Jeremy
June 8, 2022 at 4:12 pm #8230EvaParticipantPerfect, thanks!
June 12, 2022 at 9:21 am #8231EvaParticipantHi Jeremy,
Sorry for bothering you again.
I’ve managed to modify the distance between the buttons but am still struggling with adjusting their size. The problem is essentially that the clickable area is too small. I’ve currently formatted the scale as follows:
newScale("rating","1", "2", "3", "4", "5") .button() .before( newText("left", "Völlig ungrammatisch") ) .after( newText("right", "Völlig grammatisch") ) .log() .center() .labelsPosition("bottom") .print() .wait()
I’ve then added a CSS element as follows:
.PennController-Scale .option { margin: 0em 1em; font-size: 24px; }
Increasing the font size of the numbers on the scale helps a little bit, but it’s still an issue that you need to navigate the cursor very precisely to be able to hit the button, which makes the scale hard to use. (Having two different font sizes also looks a little bit awkward.) Is there any way to increase the clickable area of the scale?
Thanks!
Eva
June 13, 2022 at 11:50 am #8232JeremyKeymasterHi Eva,
Target the
label
nodes (clickable) instead of the parent.option
nodes:.PennController-Scale .option label { margin: 0em 1em; font-size: 24px; }
Jeremy
June 13, 2022 at 5:10 pm #8233EvaParticipantThat works, thanks!
-
AuthorPosts
- You must be logged in to reply to this topic.