Select to view content in your preferred language

Popup Location

954
4
Jump to solution
05-20-2014 05:48 PM
NeoGeo
by
Frequent Contributor
In the 3.6 viewer, for some reason popups always come up on the right side of the point, which means that for lower/normal resolution monitors the popup is always under the docked widget windows which starts to get really annoying after a while. I should add that I have increased the popup width to 444 to make it more usable so that exacerbates the problem.  In InfoPopup.mxml, it appears that the positionInfo() and repositioninfo() functions should control placement of the popup by determining what side of the screen the point is on like this:
                     var reg:String = "regLeft";                     if (infoPt.x > map.width / 2)                       {                         reg = "regRight";                     }

But I notice that it makes absolutely no difference if I change the number it is dividing by or even completely comment out the if statement forcing it to regLeft.  What am I missing on why it always draws to the right?
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus
J N,

   I just tested this and it works perfectly (not sure why you thought you need to change the namespace...):

esri|InfoWindow {     infoPlacement : left;     infoPlacementMode : none; }

View solution in original post

0 Kudos
4 Replies
RobertScheitlin__GISP
MVP Emeritus
J N,

   The default popup placment is controlled by CSS. See this thread for info:

http://forums.arcgis.com/threads/54004-Make-InfoWindow-popup-open-to-the-left-or-on-top-of-widget...
0 Kudos
NeoGeo
by
Frequent Contributor
Thanks Robert, I had not found that thread in my searching.  Adding that code, it still did not work, but put me on the right track.  I also tried this
Was:
esri is @namespace esri "http://www.esri.com/2008/ags";
esri|InfoWindow
{
    infoPlacement : upperLeft;
}

which I changed to this:
@namespace esriAgs "com.esri.ags.components.supportClasses.*";
esriAgs|InfoWindow
{
infoPlacement : left;
}

At that point, it seemed like it would at least put the popup on the left side some of the time.  I still have not found much rhyme or reason to it.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
J N,

   I just tested this and it works perfectly (not sure why you thought you need to change the namespace...):

esri|InfoWindow {     infoPlacement : left;     infoPlacementMode : none; }
0 Kudos
NeoGeo
by
Frequent Contributor
Changing the namespace was desperation.  changing the mode did the trick.  Thanks again!!
0 Kudos