Per Cederberg schrieb: > Ok, I see. Then we have two issues: > > #1. getElementDimensions() and setElementDimensions() isn't currently > a logical pair, since border and padding is included in > getElementDimensions but not in setElementDimensions. This is > confusing and should be better documented: > > http://trac.mochikit.com/ticket/310
Exactly. > # 2. I think the current function names can be a cause of confusion > (hence my previous question). And perhaps a single function returning > a Dimensions object would be more in line with existing MochiKit code? > See also the following Trac ticket for other related add-ons to > MochiKit.Style: > > http://trac.mochikit.com/ticket/84 > http://trac.mochikit.com/wiki/MochiKitStyleExtensions > > Perhaps a solution would be to change getElementDimensions() to return > an object containing also the CSS width and height? I.e. { w, h, cssW, > cssH } Maybe just width, height instead of cssW, cssH? This should be accompanied by changing setElementDimensions() to use width, height instead of w, h if these are present. That way we the functions would become a logical pair without losing backward compatibility. > We should probably take a look at how other toolkits (Prototype, Dojo, > etc) have handled this issue. Might give a few good ideas for creating > a concise and useful API. Good idea. Will do that later. -- 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 -~----------~----~----~----~------~----~------~--~---
