Hi all, should it be considered a bug that Element.getDimensions returns the offsetWidth and offsetHeight properties from elemens having not display none, but clientWidth and clientHeight from elements with display none? Or is it a feature? Regards Lorenz
Probably feature. I imagine when you want dimensions, you want what the dimensions are if the element were showing, not 0x0 when it isn''t. Or am I misunderstanding the question? Greg> -----Original Message----- > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org[mailto:rails-spinoffs-> bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Lorenz Knies > Sent: Friday, March 17, 2006 9:21 AM > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Subject: [Rails-spinoffs] Element.getDimensions > > Hi all, > > should it be considered a bug that Element.getDimensions returns the > offsetWidth and offsetHeight properties from elemens having not > display none, but clientWidth and clientHeight from elements with > display none? > Or is it a feature? > > Regards Lorenz > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
I think you misunderstood my question. I totally agree that one wants the dimensions as if it were showing. I just wonder why the *offset*Width/Height in one case and the *client*Width/Heigth in the other? Lorenz On 17.03.2006, at 17:47, Gregory Hill wrote:> Probably feature. I imagine when you want dimensions, you want > what the > dimensions are if the element were showing, not 0x0 when it isn''t. Or > am I misunderstanding the question? > > Greg > >> -----Original Message----- >> From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > [mailto:rails-spinoffs- >> bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Lorenz Knies >> Sent: Friday, March 17, 2006 9:21 AM >> To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >> Subject: [Rails-spinoffs] Element.getDimensions >> >> Hi all, >> >> should it be considered a bug that Element.getDimensions returns the >> offsetWidth and offsetHeight properties from elemens having not >> display none, but clientWidth and clientHeight from elements with >> display none? >> Or is it a feature? >> >> Regards Lorenz >> _______________________________________________ >> Rails-spinoffs mailing list >> Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Maybe one of them is set to 0 when display is none (might be browser-specific). Might be interesting to look into. Greg> -----Original Message----- > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org[mailto:rails-spinoffs-> bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Lorenz Knies > Sent: Friday, March 17, 2006 10:07 AM > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Subject: Re: [Rails-spinoffs] Element.getDimensions > > I think you misunderstood my question. > I totally agree that one wants the dimensions as if it were showing. > I just wonder why the *offset*Width/Height in one case and the > *client*Width/Heigth in the other? > > Lorenz > > > On 17.03.2006, at 17:47, Gregory Hill wrote: > > > Probably feature. I imagine when you want dimensions, you want > > what the > > dimensions are if the element were showing, not 0x0 when it isn''t.Or> > am I misunderstanding the question? > > > > Greg > > > >> -----Original Message----- > >> From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > [mailto:rails-spinoffs- > >> bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Lorenz Knies > >> Sent: Friday, March 17, 2006 9:21 AM > >> To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > >> Subject: [Rails-spinoffs] Element.getDimensions > >> > >> Hi all, > >> > >> should it be considered a bug that Element.getDimensions returnsthe> >> offsetWidth and offsetHeight properties from elemens having not > >> display none, but clientWidth and clientHeight from elements with > >> display none? > >> Or is it a feature? > >> > >> Regards Lorenz > >> _______________________________________________ > >> Rails-spinoffs mailing list > >> Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > >> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > _______________________________________________ > > Rails-spinoffs mailing list > > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs