12-15-2022 13:40
12-15-2022 13:40
Hey, so I have very minimal coding knowledge and am trying to put together a specific watch face for myself out of sheer determination. I am almost done but I can't seem to figure out what code I need to run 2 separate sprite animations at the same time.
I have one up and running using the information from https://dev.fitbit.com/build/guides/user-interface/svg-components/other/#sprite-image
I just can't seem to figure out how to reference a 2nd file correctly and have it animate. (No clicking, no alternating, just both running at once.) I'm sure I'm simply missing something obvious, so any help would be greatly appreciated!
Thanks
12-15-2022 14:15
12-15-2022 14:15
I think it should suffice to call .animate on the second element (passing the relevant event type). That assumes you've got the second animation set up correctly in .gui/.defs/.css.
In some cases, you can trigger multiple animations with a single call to .animate (eg, child elements responding to the same event trigger). Whether this suits you depends on the structure of your SVG.
12-15-2022 14:30
12-15-2022 14:30
I ended up catching that I missed re-naming my 2nd elementID, got it updated and I'm up and running now! Thanks for the help!