Forum Discussion
Early Access for the Advanced JavaScript API
I'm delighted a JS API for Storyline is finally happening. Honestly just the ability to define a unique immutable ID for slide elements instead of relying on data-acc-text is something we've all wanted for YEARS!
Can you confirm though JesseTaber if the API generated ID will assign itself to the containing div of the element, the same way the Accessibility Text value does, and not at the path/svg level for example? (Hoping to not have to refactor a lot of code if I want to convert existing projects to use the JS API.)
Also, I like the examples in the demo, but I'm confused about why the mouse location tracking also covers the player area? If I were wanting to use the coordinates this offers to design an animation for example then it would be more useful to have 0,0 be defined as the top-left point of the slide?
Appreciate it's still early days though and I'm excited for what's to come.
- ZevanRosser7 months agoStaff
ChrisHodgson To answer your questions, 0,0 is the top left of the slide - but the mouse location can go into negative values (maybe that is what you're seeing?).
We don't directly expose a dom element (div svg etc) - instead we have a proxy that normalizes things. This will enable us to change the internal html structure of an object while keeping old API code intact. From what you are describing I don't expect you'd need to change much to update your old code. You should definitely sign up for Early Access if you haven't already. We're eager for customer feedback to help us finalize key aspects of the api.