OffsetWidth not including padding/margins

2011-12-05 Thread decitrig
I have a PopupPanel with a Label inside. I'm trying to center the popup horizontally, so I'm calling setPopupPositionAndShow. In the callback, however, the offsetWidth and offsetHeight arguments don't take into account any margins or padding, whether I set them on the popup or the label: the

Re: OffsetWidth not including padding/margins

2011-12-05 Thread Paul Stockley
That's the expected behavior, check the DOM reference for OffsetWidth/OffsetHeight. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit

Re: OffsetWidth not including padding/margins

2011-12-05 Thread decitrig
It is? UIObject API: getOffsetWidth public int *getOffsetWidth*() Gets the object's offset width in pixels. This is the total width of the object, *including decorations such as border, margin, and padding.* *Returns:*the object's offset width Mozilla DOM