Have you tried Position.clone?

On 3/7/06, Andreas Wahlin <[EMAIL PROTECTED]> wrote:
I'd like an OS X like Puff effect. For those who don't know, this
keeps the original object during the puff effect. Is there some
simple option or do you have to do it yourself?

I tried it something like this

                                var self = this;
                                var original = this.getElementsByTagName ("img")[0];
                                var img = original.cloneNode(false);
                                img.style.position = "absolute";
                                img.style.offsetTop = original.style.offsetTop;
                                img.style.offsetLeft = original.style.offsetLeft;
                                img.style.scrollTop = original.style.scrollTop;
                                 img.style.scrollLet = original.style.scrollLeft;

                                this.appendChild(img);
                                Effect.Puff(img, {afterFinish: function() { self.removeChild
(img); }});

(basicly cloning the original image (in this case) and applying the
puff effect to the clone)
I got tired when the clone wouldn't align itself perfectly with the
original and thought I'd ask before venturing further :)

Andreas
_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs

_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs

Reply via email to