jpongin
2007-Apr-19 07:09 UTC
How can I extend the Element object so that I can propose a light-weight element drop shadow effect.
Hey Everyone, First off... I LOVE prototypejs... because it saves me hours of pain, and makes fe development enjoyable and fun. Okay, down to business: I was combing Google for some type of js drop shadow javascript effect, but most of the solutions I found included multiple files (js, css, even .gif!) -- ick. Out of necessity, I made a super lightweight opacitized drop shadow effect you can apply to any element -- even multiple elements without breaking stacking order -- tested on FF2.x, Safari, Opera, IE6, and IE7 of course. It''s also sensibly configurable -- not too much, and not too little. I already read the process to contribute, and I''ll create my subversion project and run it through the tests. So, I''d like to know how to add my method for my contribution proposal. I''d like to hear several opinions on these questions: 1) Does this belong in prototypejs? I looked at scriptaculous, and that lib seems a bit too Hollywood compared to this light weight effect. 2) If it does have a place in prototypejs, which object should it belong to? I think it would belong to the Element or Element.Methods object. I suspect once I get my Prototype Subversion project up and running, the Element.Methods object is going to look something like this: Element.Methods = { blah, blah, blah, <myProperty> : function(...) {...} } Help is greatly appreciated. Thanks for the awesome framework. --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---
Michael Peters
2007-Apr-19 12:36 UTC
Re: How can I extend the Element object so that I can propose a light-weight element drop shadow effect.
jpongin wrote:> Out of necessity, I made a super lightweight opacitized drop shadow > effect you can apply to any element -- even multiple elements without > breaking stacking order -- tested on FF2.x, Safari, Opera, IE6, and > IE7 of course. It''s also sensibly configurable -- not too much, and > not too little.Good to know and I''m sure it will be quite useful.> 1) Does this belong in prototypejs? I looked at scriptaculous, and > that lib seems a bit too Hollywood compared to this light weight > effect.No. Prototype should remain as small as possible. While this feature would be useful for some, it''s hardly a universal must-have. I have a vision of one day creating an archive of javascript libraries built off of prototype and scriptaculous (taking the idea of Perl''s CPAN - http://search.cpan.org)). You could define dependencies on other libraries Examples and test suites would be provided that could be run from a browser so you can try before you buy. And lots of other cool things. But I don''t really have the time or resources to devote to it now. If something like that ever happens, then you could publish you library there. Until then, setup your own repository and web page for the library. Post it here and just keep the community informed about releases and progress.> 2) If it does have a place in prototypejs, which object should it > belong to? I think it would belong to the Element or Element.Methods > object.I personally wouldn''t put it into the Element namespace. I''d pick something different like Shadow or DropShadow. DropShaddow.apply(''element_id''); -- Michael Peters Developer Plus Three, LP --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---
jpongin-dev-/E1597aS9LQAvxtiuMwx3w@public.gmane.org
2007-Apr-19 15:59 UTC
Re: How can I extend the Element object so that I can propose a light-weight element drop shadow effect.
Thanks Mike, After the alcohol buzz wore down, it was pretty clear that this doesn''t belong in prototype. I''ll try to submit to scriptaculous and see what happens since their lib is totally heavy weight. Can''t wait to see your vision up and running. Keep me posted. Although I do have some ideas for prototype after having used it to develop this effect. Thanks again. -James ----- Original Message ---- From: Michael Peters <mpeters-aUYv5hkjw45l57MIdRCFDg@public.gmane.org> To: rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Sent: Thursday, April 19, 2007 5:36:10 AM Subject: [Rails-spinoffs] Re: How can I extend the Element object so that I can propose a light-weight element drop shadow effect. jpongin wrote:> Out of necessity, I made a super lightweight opacitized drop shadow > effect you can apply to any element -- even multiple elements without > breaking stacking order -- tested on FF2.x, Safari, Opera, IE6, and > IE7 of course. It''s also sensibly configurable -- not too much, and > not too little.Good to know and I''m sure it will be quite useful.> 1) Does this belong in prototypejs? I looked at scriptaculous, and > that lib seems a bit too Hollywood compared to this light weight > effect.No. Prototype should remain as small as possible. While this feature would be useful for some, it''s hardly a universal must-have. I have a vision of one day creating an archive of javascript libraries built off of prototype and scriptaculous (taking the idea of Perl''s CPAN - http://search.cpan.org)). You could define dependencies on other libraries Examples and test suites would be provided that could be run from a browser so you can try before you buy. And lots of other cool things. But I don''t really have the time or resources to devote to it now. If something like that ever happens, then you could publish you library there. Until then, setup your own repository and web page for the library. Post it here and just keep the community informed about releases and progress.> 2) If it does have a place in prototypejs, which object should it > belong to? I think it would belong to the Element or Element.Methods > object.I personally wouldn''t put it into the Element namespace. I''d pick something different like Shadow or DropShadow. DropShaddow.apply(''element_id''); -- Michael Peters Developer Plus Three, LP --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---