I like the idea of adding a boolean parameter to
getElementDimensions(). But we needn't return the actual values found
I think. Like this:

getElementDimensions(element[,innerSize=false])

So calling getElementDimensions(elem, true) would return the inner
dimensions instead of the outer (as the current version). That way, no
change would be needed to setElementDimensions at all.

Cheers,

/Per

On Wed, Jun 11, 2008 at 1:32 PM, Christoph Zwerschke <[EMAIL PROTECTED]> wrote:
>
> Per Cederberg schrieb:
>  > I did something similar once, but it is a bit of a pain to read 4
>  > computed values (which is slow) instead of just using offsetHeight.
>  > But since it is just used during initialization, speed won't be a
>  > problem here. But we should still keep it separate from
>  > getElementDimensions for performance reasons I think.
>
> Yes. Maybe we should just add an additional function
> getFullElementDimensions that returns the same as getElementDimensions,
> and additionally also border, margin and padding plus the calculated
> "real" width and height. Of course this will be slow, but it will not be
> used very often. But the initialization of the visual effects is a use
> case. And setElementDimensions should recognize the additional values
> and operate correctly if they are present, otherwise behave like before.
>
> Instead of an additional function, we can also consider a boolean
> parameter to getElementDimensions for returning the additional values.
>
> -- Christoph
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"MochiKit" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to