JS API 3.28 - Popups - Does popup.resize() Work?

563
2
05-09-2019 06:54 AM
IanPeebles
Occasional Contributor III

Hello everyone.  I have created numerous applications using the InfoTemplate, however, I have been experimenting with some popups.  I noticed the API allows for resizing the popup, say 500px by 500px.  However, when attempting to use the:

popup.resize(500,500);

The popup does not resize to this size. The width looks good, but the height does not honor the 500px height.  Is there an explanation on why this may not work?

I am referring to this sample:

https://developers.arcgis.com/javascript/3/sandbox/sandbox.html?sample=popup_relatedrecords

Also, here is a screenshot of my results:

I may want different sizes of popups for various features.

Anyone else have this issue?  Does this really work effectively?

0 Kudos
2 Replies
RobertScheitlin__GISP
MVP Emeritus

Ian,

The new height of the InfoWindow in pixels. This value is set to be the maximum allowable height, if the content doesn't fit within the specified height a vertical scroll bar is displayed.

This mean that the height set is the max height allowed and not the height that the popup will actually be resized to unless the content requires that height.

IanPeebles
Occasional Contributor III

Robert, thank you for the response.   Oh... I see.  I was checking out the  popup wrapper to check, but now that makes sense.  I may stick with what I have for the time being.  I have used CSS to modify field positions and etc.