[mochikit] Forcing animations to finish

2006-12-05 Thread Juergen Schreck

Hi -

Is there a recommended way to make Visual animations finish?

I have a couple of situations with e.g. 'grow' or 'blindDown'. Assume  
a 'grow' transition is half done. Clicking another link will first  
'shrink' the current node, then swap out content and grow it again.  
It will now only grow as far as it got before the shrink was executed.

I offer again the same link as yesterday:

http://www.bwpr.com/new.html

Click on 'Community Relations'.
Click on 'Media Relations', but before the 'shrink' is complete,  
click 'Community Relations' again.

See what I mean?

I'm looking to see if there's something that let's me skip to a  
finish in the animation. Otherwise, I'm think of setting a 'lock'  
variable during transition and ignoring clicks while it is true.

Suggestions?

Thanks,
Juergen



--~--~-~--~~~---~--~~
 You received this message because you are subscribed to the Google Groups 
"MochiKit" group.
To post to this group, send email to mochikit@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/mochikit?hl=en
-~--~~~~--~~--~--~---



[mochikit] Re: Safari 1.3 - 2.0.3 link events

2006-12-05 Thread Beau Hartshorne

Doing a "return false;" shouldn't hurt anything. Not everyone wants  
to stop onclick events on  tags, so it doesn't make sense to add  
that to Signal. I've added a note about this bug to the docs:
http://trac.mochikit.com/changeset/1230

Thanks,
Beau

On 5-Dec-06, at 5:37 AM, Juergen Schreck wrote:

> Ok, I've done some more testing with the simplified script:
>
> one
> two
>
> 
>  $('one').onclick=function(){ return false; };
>
>  connect('one', 'onclick', function(e) {
>  e.stop();
>  alert('one');
>  });
>
>  connect('two', 'onclick', function(e) {
>  e.stop();
>  alert('two');
>  });
> 
>
>
> Basically, rather than adding the onlick attribute in the markup, I
> added it in code. And it works properly with Safari 1.3+ and still
> works with others. The question now becomes if this is some MochiKit
> could/should handle transparently? There's a lot of pre-2.0.4
> Safari's out there...
>
> I guess it would be an exception in connect for Safari if the source-
> element is an  and the event is 'onclick'.


--~--~-~--~~~---~--~~
 You received this message because you are subscribed to the Google Groups 
"MochiKit" group.
To post to this group, send email to mochikit@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/mochikit?hl=en
-~--~~~~--~~--~--~---



[mochikit] Re: Safari 1.3 - 2.0.3 link events

2006-12-05 Thread Juergen Schreck

Ok, I've done some more testing with the simplified script:

one
two


 $('one').onclick=function(){ return false; };

 connect('one', 'onclick', function(e) {
 e.stop();
 alert('one');
 });

 connect('two', 'onclick', function(e) {
 e.stop();
 alert('two');
 });



Basically, rather than adding the onlick attribute in the markup, I  
added it in code. And it works properly with Safari 1.3+ and still  
works with others. The question now becomes if this is some MochiKit  
could/should handle transparently? There's a lot of pre-2.0.4  
Safari's out there...

I guess it would be an exception in connect for Safari if the source- 
element is an  and the event is 'onclick'.

Juergen





On Dec 5, 2006, at 1:40 AM, Beau Hartshorne wrote:

> On 4-Dec-06, at 9:55 PM, Juergen Schreck wrote:
>
>> Found some more info here.
>>
>> http://www.codingforums.com/archive/index.php?t-30983.html
>>
>> Given the date of those posts, and the fact that one of my clients
>> was running 2.0.3 (the latest official version being 2.0.4) it
>> probably was only recently fixed.
>>
>> I don't know if this is some MochiKit can/should work around.
>
> Here's a reduced test you can try:
>
> one
> two
>
> 
> connect('one', 'onclick', function(e) {
> e.stop();
> alert('one');
> });
>
> connect('two', 'onclick', function(e) {
> e.stop();
> alert('two');
> });
> 
>
> You don't need to return false from the event handlers you call  
> with connect, that doesn't do anything. Adding onclick="return  
> false;" to the  tags shouldn't cause any problems.
>
> Beau
>


--~--~-~--~~~---~--~~
 You received this message because you are subscribed to the Google Groups 
"MochiKit" group.
To post to this group, send email to mochikit@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/mochikit?hl=en
-~--~~~~--~~--~--~---



[mochikit] Re: Safari 1.3 - 2.0.3 link events

2006-12-05 Thread Juergen Schreck


On Dec 5, 2006, at 1:40 AM, Beau Hartshorne wrote:

> You don't need to return false from the event handlers you call  
> with connect, that doesn't do anything. Adding onclick="return  
> false;" to the  tags shouldn't cause any problems.

I realize that now. I was just still doing it [in addition to stop()]  
because that's what I was used to doing.

But are you saying that in addition to connecting the signal, I can  
add an onclick attribute? I though I read somewhere [in the MK doco]  
that that can cause unpredictable problems. But now I can't find that  
text...

Regards,
Juergen

--~--~-~--~~~---~--~~
 You received this message because you are subscribed to the Google Groups 
"MochiKit" group.
To post to this group, send email to mochikit@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/mochikit?hl=en
-~--~~~~--~~--~--~---



[mochikit] Re: MochiKit.Signal and IE 6

2006-12-05 Thread Theuni

For the record:

Always include the MochiKit javascript first, and then your own user
libraries. Otherwise you'll get weird errors that are hard to
understand and hard to debug.


--~--~-~--~~~---~--~~
 You received this message because you are subscribed to the Google Groups 
"MochiKit" group.
To post to this group, send email to mochikit@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/mochikit?hl=en
-~--~~~~--~~--~--~---