Adjusting InfoWindow Position

Discussion created by adevine on Nov 1, 2012
Latest reply on Dec 4, 2015 by joaoppvn

I am making a web application that features an info window that displays a pdf hosted on my web server. The content of the infoWindow is set by a function that generates a deferred object that is an iframe display in the infoWindow. This is relevant because this structure makes it necessary for me to use the infoWindow rather than the popup dijit.

These pdfs are 4x4 and the infoWindow is sized slightly larger to enable full display of the content. The problem I am running into is that, map.getInfoWindowAnchor(evt.screenPoint));
sometimes cause the infoWindow to be partially off the map. Does anyone know of any code that I can use to make the info windows aware of the map border and adjust the position so that entire infoWindow is on the map? I remember doing this in Silverlight for a project but can't seem to find an analog for Javascript looking through the API reference and forum posts.

Thanks in advance for any help.