Hello. i'm trying to apply js code to make some animation for my screen, but it seems doesn't work, tell me what to do or where i wrong, tks so much, love ^^...
Hi @Tony Nguyen ,
a few initial remarks, haven't looked at your code yet :
My advice would be to first put the code you are not sure about / unfamiliar with in an action to be triggered by a button, and once you are satisfied it works, work on the timing.
If you need more help, please share an oml.
Dorine
PS : to help yourself understand what's going on, add a console.log of each variable you are setting, right after setting it, that will also help you see if they are set properly. In your example, it will probably show a lot of undefined's.
Thx so much. This is oml filehttps://drive.google.com/file/d/1cZNQDgsABd7Q_zqKKjxUJI27kOw7PAfA/view?usp=sharing
those issues are in sreen test 1...
no, attach the oml to the post, no links to google drive, please
my oml file is over than 5mb so i can't..up load here...
why is it that large ? Have you removed all unused dependencies ?
you could always make a smaller one demonstrating the animation part (so just that sample screen with the sample script).
it's just 18mb, lady. i just test some screen so it includes some images...
euhm,
ok, I think that's extremely large for a single module and should probably be looked at fixing, but that's outside the subject of this post.
So, let's wait and see if someone feels like downloading that to their personal environment from your google drive, then...
Hi Tony,
As Dorine already pointed out, one of the main reasons the script didn't work as expected is that the referenced elements in the JS code were not rendered in the DOM at the moment of execution.
To make it work, I have made a few code changes as mentioned below:
Code Changes:
Demo app: Animation_POC
Refer to the attached OML file with the code changes.
I hope this is helpful to you!
Kind regards,
Benjith Sam