Just wondered if there are examples of how to draw using code for non-static elements?
eg Using lines to draw a graph or drawing arcs to show the seconds around the edge (like Fitbit Blaze Chronograph face).
Thanks,
NiVZ
Answered! Go to the 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.
Great question.
We don't currently have a drawing or canvas API, but it's something we're definitely aware of the benefits.
You also can't directly modify the innerHTML, or it's equivalent in this case.
You can however dynamically adjust the attributes of the existing svg elements, like <arc>.
https://dev.fitbit.com/guides/user-interface/svg/#arc
I'll try to add an example to the developer website.
I'm interested in this as well.
I'm wondering if the answer is essentially that you have to modify the document's innerHTML manually to edit "inline" .gui files.
Perhaps with the help of Preact if it can handle the 3kb memory hit it could be accomplished in a React / JSX style way. I could be overthinking things and introducing unneeded complexity, but I'm not seeing an actual drawing library like <canvas> provides.
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.
Great question.
We don't currently have a drawing or canvas API, but it's something we're definitely aware of the benefits.
You also can't directly modify the innerHTML, or it's equivalent in this case.
You can however dynamically adjust the attributes of the existing svg elements, like <arc>.
https://dev.fitbit.com/guides/user-interface/svg/#arc
I'll try to add an example to the developer website.
Examples will really help get us started. The initial ones don't cover all we need, as Paul has highlighted.
Best AnswerI know that visibility can't be toggled, but what about access to an element's classList methods?
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.
classList isn't available, sorry.
Best Answer