Problem with Dojo Effects & Animation

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Problem with Dojo Effects & Animation

Praneet Kandula
I've noticed a problem with most of the dojo effects. An example of the problem in one specific instance.

1) An element, say a collapsible box with wipeIn and wipeOut when the user clicks on it exists.

2) The user clicks the box to launch one of the effects.. say wipeIn

3) The user clicks the box again, before the wipeIn effect finishes, causing the wipeIn effect to stall halfway and the wipeOut effect to start up.

At this point, the box is pretty screwed up. The effects now launch only halfway. If the original box's height was 100px, the wipeIn effect would only reveal 50px or so.

There should be some logic within the animation code that checks if an animation is underway, and not fire off another animation before the first one finishes. Another javascript effects library, moofx ( http://moofx.mad4milk.net/) has this feature: builtin checks that won't let a user break the effect with multiple crazy clicks. I think that's what I'm looking for.

_______________________________________________
Dojo-interest mailing list
[hidden email]
http://dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problem with Dojo Effects & Animation

Karl Tiedt
A product of this issue has already made it into the bug reports due
to wipeIn/wipeOut, link is: http://dojotoolkit.org/trac/ticket/114

-Karl

On 12/14/05, Praneet Kandula <[hidden email]> wrote:

> I've noticed a problem with most of the dojo effects. An example of the
> problem in one specific instance.
>
> 1) An element, say a collapsible box with wipeIn and wipeOut when the user
> clicks on it exists.
>
> 2) The user clicks the box to launch one of the effects.. say wipeIn
>
> 3) The user clicks the box again, before the wipeIn effect finishes, causing
> the wipeIn effect to stall halfway and the wipeOut effect to start up.
>
> At this point, the box is pretty screwed up. The effects now launch only
> halfway. If the original box's height was 100px, the wipeIn effect would
> only reveal 50px or so.
>
> There should be some logic within the animation code that checks if an
> animation is underway, and not fire off another animation before the first
> one finishes. Another javascript effects library, moofx (
> http://moofx.mad4milk.net/) has this feature: builtin checks that won't let
> a user break the effect with multiple crazy clicks. I think that's what I'm
> looking for.
>
> _______________________________________________
> Dojo-interest mailing list
> [hidden email]
> http://dojotoolkit.org/mailman/listinfo/dojo-interest
>
>
>


--
-Karl Tiedt
_______________________________________________
Dojo-interest mailing list
[hidden email]
http://dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problem with Dojo Effects & Animation

Marco van de Haar
If you want a simple work-around in stead of having to wait for a new
version you could use a simple state.  this would catch wiper-fucntion
calls during animation and only react to clicks after the animation is
complete, this way element will always wipe to orriginal hight.

element_state = 'wiped';
function element_wipe(){
  if(element_state != wiping){
  {
    element_state = 'wiping';

  dojo.fx.html.wipeIn(node, duration, function(){element_state=wiped;}

   }
}

and then bind element_wipe() to element's onclick or something ... be
creative ;)

Karl Tiedt wrote:

>A product of this issue has already made it into the bug reports due
>to wipeIn/wipeOut, link is: http://dojotoolkit.org/trac/ticket/114
>
>-Karl
>
>On 12/14/05, Praneet Kandula <[hidden email]> wrote:
>  
>
>>I've noticed a problem with most of the dojo effects. An example of the
>>problem in one specific instance.
>>
>>1) An element, say a collapsible box with wipeIn and wipeOut when the user
>>clicks on it exists.
>>
>>2) The user clicks the box to launch one of the effects.. say wipeIn
>>
>>3) The user clicks the box again, before the wipeIn effect finishes, causing
>>the wipeIn effect to stall halfway and the wipeOut effect to start up.
>>
>>At this point, the box is pretty screwed up. The effects now launch only
>>halfway. If the original box's height was 100px, the wipeIn effect would
>>only reveal 50px or so.
>>
>>There should be some logic within the animation code that checks if an
>>animation is underway, and not fire off another animation before the first
>>one finishes. Another javascript effects library, moofx (
>>http://moofx.mad4milk.net/) has this feature: builtin checks that won't let
>>a user break the effect with multiple crazy clicks. I think that's what I'm
>>looking for.
>>
>>_______________________________________________
>>Dojo-interest mailing list
>>[hidden email]
>>http://dojotoolkit.org/mailman/listinfo/dojo-interest
>>
>>
>>
>>    
>>
>
>
>--
>-Karl Tiedt
>_______________________________________________
>Dojo-interest mailing list
>[hidden email]
>http://dojotoolkit.org/mailman/listinfo/dojo-interest
>
>  
>

_______________________________________________
Dojo-interest mailing list
[hidden email]
http://dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problem with Dojo Effects & Animation

Alex Russell
So I don't think the original poster's point was that this is
tremendously difficult, merely that as a user of the effects system, I
expect this kind of housekeeping to be done for me or exposed in a
clean wrapper; a sentiment I tend to agree with.

Regards

On Wednesday 14 December 2005 5:21 am, Marco van de Haar wrote:

> If you want a simple work-around in stead of having to wait for a new
> version you could use a simple state.  this would catch
> wiper-fucntion calls during animation and only react to clicks after
> the animation is complete, this way element will always wipe to
> orriginal hight.
>
> element_state = 'wiped';
> function element_wipe(){
>   if(element_state != wiping){
>   {
>     element_state = 'wiping';
>
>   dojo.fx.html.wipeIn(node, duration,
> function(){element_state=wiped;}
>
>    }
> }
>
> and then bind element_wipe() to element's onclick or something ... be
> creative ;)

--
Alex Russell
[hidden email] BE03 E88D EABB 2116 CC49 8259 CF78 E242 59C3 9723
[hidden email]  F687 1964 1EF6 453E 9BD0 5148 A15D 1D43 AB92 9A46
_______________________________________________
Dojo-interest mailing list
[hidden email]
http://dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problem with Dojo Effects & Animation

Karl Tiedt
I would agree, and if you look at the bug trac I posted... I did state
that a simple fix was in place for the case that I found the bug
occuring, and recommended a similiar fix action be implemented for the
state checks prior to effects firing.

On 12/14/05, Alex Russell <[hidden email]> wrote:
> So I don't think the original poster's point was that this is
> tremendously difficult, merely that as a user of the effects system, I
> expect this kind of housekeeping to be done for me or exposed in a
> clean wrapper; a sentiment I tend to agree with.
>
> Regards
_______________________________________________
Dojo-interest mailing list
[hidden email]
http://dojotoolkit.org/mailman/listinfo/dojo-interest
Loading...