Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Implement new dimension param helpers

#6

===Element Dimensions Definitions===


box     = margin + border + padding + content
visual  = box - margin
client  = visual - border
content = client - padding

Box refers to box model dimensions definition: http://www.w3.org/TR/CSS2/box.html

Visual refers to the offset dimensions specified by the MS DHTML object model: https://developer.mozilla.org/en/DOM/element.offsetWidth

Content refers the the content section in the box model definition.


element#getDimensions(String preset | Object options) -> { width: number, height: number }

presets = box, visual, client, content
options = { margin: true, border: true, padding: true }

element#getDimensions() -> Defaults to "visual"

element#getDimensions({ margin: true, border: true, padding: true }) -> returns Object representing box preset
element#getDimensions({ margin: false, border: true, padding: true }) -> returns Object representing visual preset
element#getDimensions({ margin: false, border: false, padding: true }) -> returns Object representing client preset
element#getDimensions({ margin: false, border: false, padding: false }) -> returns Object representing content preset

Reported by John-David Dalton · February 4th, 2009 @ 10:43 AM

State: resolved
Milestone: none
Assigned to: John-David Dalton John-David Dalton

Activity

  1. John-David Dalton
    John-David Dalton
    • Assigned user changed from John-David Dalton to Joe Gornick

    February 8th, 2009 @ 01:08 PM

  2. John-David Dalton
  3. Joe Gornick
    Joe Gornick

    So the content preset might be confusing. According to: https://developer.mozilla.org/en/Determining_the_dimensions_of_elem..., the content is considered as the scroll dimensions. In the getDimensions case, for the "content" width/height, is it the visible width and height? Or should it be the scroll width/height?

    August 26th, 2009 @ 01:20 AM

  4. Joe Gornick
  5. Joe Gornick
    Joe Gornick
    • State changed from new to patched
    • Assigned user changed from Joe Gornick to John-David Dalton

    August 30th, 2009 @ 03:28 PM

  6. John-David Dalton

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.