jameelshammr / core-plot

Automatically exported from code.google.com/p/core-plot
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Unexpected animationCancelled: notification #602

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I have 2 xRange animations depending on a state (year mode vs month mode). I 
start out in year mode. On user click I animate to month mode. Another click 
and I animate back to year mode. The next click again animates to month mode 
and now I unexpectedly get the animationCancelled: notification for the last 
animation to year mode, even though it is over already.

This could have to do with the fact that the switch to year mode has a bug so 
that source and target xRange are the same. So in fact the animation shouldn't 
even be created in that case.

Original issue reported on code.google.com by mike.lischke on 26 Oct 2013 at 2:35

GoogleCodeExporter commented 8 years ago

Original comment by eskr...@mac.com on 26 Oct 2013 at 3:16

GoogleCodeExporter commented 8 years ago
Are you saying that CPTAnimation should refuse to create animations where the 
start and end points are the same?

Original comment by eskr...@mac.com on 26 Oct 2013 at 6:22

GoogleCodeExporter commented 8 years ago
Well, because of the delegate invocations it might be better to create that 
animation temporarily, but it doesn't need to be added to the animation queue.

Original comment by mike.lischke on 27 Oct 2013 at 9:23

GoogleCodeExporter commented 8 years ago
If the starting and ending values are the same, every intermediate update will 
be the same, too. Most property setters check for this condition and don't 
cause redraws. If an animation doesn't have a delegate, there's no point in 
adding the animation to the queue. If it does have a delegate, I think we 
should assume that the client expects the delegate to be called at the 
appropriate times and therefore create and add the animation to the queue.

Original comment by eskr...@mac.com on 27 Oct 2013 at 1:53

GoogleCodeExporter commented 8 years ago
I'm fine with that. My proposal was just an idea how my actual issue can be 
resolved, namely that I get an animcationCancelled: call for an animation which 
is long over (at least time-wise). I'm not even sure it's the animation with 
the same start and stop values that causes the trouble.

Original comment by mike.lischke on 27 Oct 2013 at 2:04

GoogleCodeExporter commented 8 years ago
This issue was closed by revision a0a7843cb3a1.

Original comment by eskr...@mac.com on 2 Nov 2013 at 10:27