Hello, was wondering if anyone has been playing with the .onclick event for onscreen items. I can't figure out what I'm doing wrong, but basically I have a grid of icons and am trying to trap each icons tap using the onclick event in JS:
tl.onclick = function(e) {
console.log("click tl");
tl.href = setTheTile("TL");
}
I have also set the pointer-events="visible" in the index.gui file for each svg element.
What's odd is that this code works fine if the images are towards the bottom of the screen. They seem hit or miss when in the middle and I cannot get anything to register towards the top. I don't think it's the touchscreen since all other menus (slide right) seem to work fine with icons towards the top.
Any ideas of what I might be missing?
Answered! Go to the Best Answer.
Best Answer
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
You'll kick yourself.
Look where these 2 <text> elements are drawn 🙂
https://github.com/MicroByter/FitBitDev/blob/master/TicTacToe/resources/styles.css#L13
https://github.com/MicroByter/FitBitDev/blob/master/TicTacToe/resources/styles.css#L23
Best Answer
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
Best Answer
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
You'll kick yourself.
Look where these 2 <text> elements are drawn 🙂
https://github.com/MicroByter/FitBitDev/blob/master/TicTacToe/resources/styles.css#L13
https://github.com/MicroByter/FitBitDev/blob/master/TicTacToe/resources/styles.css#L23
Best AnswerSeriously... Just seriously... I am going to hang my head in shame...
Thanks for the 2nd pair of eyes, didn't even think of looking at the CSS.
![]()
Best Answer