Bubble out the code that handles the re-sizing of the popup into an APIMethod: updateSize(). Other change is that now instead of using the 'contentHTML' string property to autosize, we will now use the actual contentDiv's 'innerHTML' property. This is possible because in the setContentHTML() function, we switch around the order and set the conentDiv.innerHTML *before* calling updateSize(). Seemingly minor, this change actually does wonders towards distancing us from the horrendous idea that the 'contentHTML' property was in the first place. Now, if users go in and fudge with the contentDiv DOMElement directly, they can still benefit from the auto-sizing. In fact, 'contentHTML' can be totally ignored altogether. joy. All tests pass, including an eyeballing of the acceptance test examples/popupMatrix.html in ff2 and ie7. Mil gracias to cr5 for the speedy review (Closes #1708)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@7886 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
"valid default popupid");
|
||||
var firstID = popup.id;
|
||||
t.ok(popup.size.equals(size), "good default popup.size");
|
||||
t.eq(popup.contentHTML, "", "good default popup.contentHTML");
|
||||
t.eq(popup.contentHTML, null, "good default popup.contentHTML");
|
||||
t.eq(popup.backgroundColor, OpenLayers.Popup.COLOR, "good default popup.backgroundColor");
|
||||
t.eq(popup.opacity, OpenLayers.Popup.OPACITY, "good default popup.opacity");
|
||||
t.eq(popup.border, OpenLayers.Popup.BORDER, "good default popup.border");
|
||||
|
||||
Reference in New Issue
Block a user