#6 ✓resolved
John-David Dalton

Implement new dimension param helpers

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

===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

Comments and changes to this ticket

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.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

JavaScript frameworks share similar features and functionality such as DOM manipulation, event registration, and CSS selector engines. FuseJS attempts to incorporate the strengths of these frameworks into one stable, efficient, and optimized core JavaScript framework.

People watching this ticket

Pages