Ticket #84 (assigned defect)

Opened 2 years ago

Last modified 2 months ago

Update DOM positioning API

Reported by: beau@hartshornesoftware.com Assigned to: beau@hartshornesoftware.com (accepted)
Priority: normal Milestone: MochiKit 1.5
Component: component1 Version:
Severity: normal Keywords:
Cc:

Description (Last modified by beau@hartshornesoftware.com)

I'd like to see some changes to the DOM positioning API:

  • Rename elementDimensions to getContentDimensions, alias elementDimensions to it.
  • Add getBoxDimensions, it will include the border, margin, and padding sizes in the calculation.
  • Add getPaddingBox, getBorderBox, and getMarginBox. These will return a new {t, r, b, l} object.

Please add any suggestions as a comment to this ticket.

Change History

04/05/06 23:52:59 changed by beau@hartshornesoftware.com

  • status changed from new to assigned.

04/05/06 23:56:37 changed by beau@hartshornesoftware.com

04/06/06 00:46:38 changed by beau@hartshornesoftware.com

Do these belong in a seperate Style module?

04/06/06 00:51:24 changed by beau@hartshornesoftware.com

04/25/06 10:59:47 changed by bob@redivi.com

Is this done? Do we want it for 1.3?

04/25/06 21:31:13 changed by beau@hartshornesoftware.com

No, I think it's best to add these in a Style module just after the 1.3 release.

06/10/06 11:32:23 changed by beau@hartshornesoftware.com

08/02/06 13:34:29 changed by beau@hartshornesoftware.com

  • description changed.

Content dimensions should accept "auto" as a parameter.

08/02/06 13:35:26 changed by beau@hartshornesoftware.com

  • description changed.

11/18/06 16:11:42 changed by bob@redivi.com

  • milestone set to MochiKit 1.4.

01/20/07 18:54:08 changed by beau@hartshornesoftware.com

  • milestone changed from MochiKit 1.4 to MochiKit 1.5.

03/17/08 04:12:39 changed by cederberg@gmail.com

The Dojo link has changed I think: http://trac.dojotoolkit.org/browser/dojo/trunk/_base/html.js

Beau, do you have any code written for this? If that is the case, couldn't you add it to the Wiki pages while we're waiting for a 1.4 release? Otherwise I'll just write up something that fits my current needs and post it later. Thanks.

03/17/08 13:27:38 changed by beau@hartshornesoftware.com

No, I don't have any code for this.

03/18/08 00:26:41 changed by cederberg@gmail.com

Ok. I went ahead and created two draft functions yesterday. Now posted on the Wiki:

http://trac.mochikit.com/wiki/MochiKitStyleExtensions

Feel free to comment and/or fix any issues. Noted also that Dojo uses { t, l, w, h } objects (something they call extents). Don't know if there are any advantages to that API over the one suggested here.