I think the most beneficial way is to just store what you need in an
object for easy replacement. Scriptaculous does this for a few effects
already.
var oldStyle = {
width: element.style.width,
height: element.style.height,
...
}
then later on ...
element.setStyle(oldStyle);
Brandon
On 8/22/06, Sam <sam.google-Uc2IQQBAS6sAvxtiuMwx3w@public.gmane.org>
wrote:>
> > I believe afterFinish should be available to use.
> >
> > >
> > >
> > > Is there an option at the end of the effect to call my own
> > end-action
> > > routine? I could set the styles to nothing at that point.
>
>
> This begs a larger question. How could JavaScript determine the initial
*style* state of an element (e.g., the state of locally
> applied styles), snapshot that state, then restore the state after
Effect.Hightlight is called? Wouldn''t a loop through all the
> defined styles of an element be overkill, as the style property would be
reading the cascaded style of all parent elements and
> anything applied to the element from and external style sheet?
>
> Sam
>
>
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Spinoffs" group.
To post to this group, send email to
rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs
-~----------~----~----~----~------~----~------~--~---