[SOLVED] Stopping/Removing animation?

Answered Closed
0
0

Hi,

I have created a simple rotation animation and assigned it to an PictureBox, no problem.

My issue is stopping the animation and maybe restoring the state of the control before the animation was applied (i.e. reset rotation to 0 deg).

There is a .Run() method, but strange there is no .Stop() on the animation properties?

I could use two PictureBox, one with the rotation applied and one without – using the correct one as appropriate, would this be the simpler approach even though it seems a bit of a hack?

Regards,
Mark

  • You must to post comments
Best Answer
0
0

Hi Mark,

#1988 is now also fixed in Wisej 2.0.47.

Best regards
Frank

  • You must to post comments
0
0

Hi Frank,

Thanks for the work-around, that will do for now.

Regards,
Mark

  • You must to post comments
0
0

Hi Mark,

thanks for providing that sample.
I have logged issue #1988 and am happy to inform you that in the next Wisej build
a call to animation.ResetAnimation() will also stop a running animation
(either if it´s a css or javascript animation).

As a workaround until the new build is available you can now use this code for your sample:

this.pictureBox1.Eval(“this.getContentElement().getDomElement().style.animation = ””);

Best regards
Frank

  • You must to post comments
0
0

Hi Frank,

I tried your suggestion, no effect I’m afriad (unless less I’m doing something wrong).

Attached a simple sample, with the rotation anim in.

Regards,
Mark

Attachment
  • You must to post comments
0
0

Hi Mark,

have you tried this.animation.ResetAnimation(this.PictureBox) to remove the animation?
If it does not work, could you please wrap up a small test case ?

Thanks in advance.

Best regards
Frank

  • You must to post comments
Showing 5 results