<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Editor widget in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/editor-widget/m-p/679010#M63297</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Seems like editor digit (with toolbar) does not display the info window correctly, info window goes out of the map if you click on a feature&amp;nbsp; located in the upper, left or right portion of the map. It does not happen with attribute inspector though. Is there a way I can fix the position of the info window?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 11 Sep 2012 14:36:14 GMT</pubDate>
    <dc:creator>VIKRANTKRISHNA</dc:creator>
    <dc:date>2012-09-11T14:36:14Z</dc:date>
    <item>
      <title>Editor widget</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/editor-widget/m-p/679010#M63297</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Seems like editor digit (with toolbar) does not display the info window correctly, info window goes out of the map if you click on a feature&amp;nbsp; located in the upper, left or right portion of the map. It does not happen with attribute inspector though. Is there a way I can fix the position of the info window?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Sep 2012 14:36:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/editor-widget/m-p/679010#M63297</guid>
      <dc:creator>VIKRANTKRISHNA</dc:creator>
      <dc:date>2012-09-11T14:36:14Z</dc:date>
    </item>
    <item>
      <title>Re: Editor widget</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/editor-widget/m-p/679011#M63298</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;its not exactly the same as forcing the infoWindow to utilize a different anchor, but I was able to pan the map to ensure that the entire infoWindow is displayed using the following code...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;//set a global fixed anchor for the infoWindow when the application loads (initEditing might be a good place)
map.infoWindow.setFixedAnchor(esri.dijit.InfoWindow.ANCHOR_UPPERRIGHT);

//afterwards wire up the event handling to make sure the map will pan if the entire infoWindow isn't going to fit on the screen
dojo.connect(map.infoWindow, "onShow", function() {
&amp;nbsp;&amp;nbsp; //Determine the upper right, and center, coordinates of the map
&amp;nbsp;&amp;nbsp; var maxPoint = new esri.geometry.Point(map.extent.xmax, map.extent.ymax)
&amp;nbsp;&amp;nbsp; var centerPoint = new esri.geometry.Point(map.extent.getCenter());

&amp;nbsp;&amp;nbsp; //Convert these to screen coordinates
&amp;nbsp;&amp;nbsp; var maxPointScreen = map.toScreen(maxPoint);
&amp;nbsp;&amp;nbsp; var centerPointScreen = map.toScreen(centerPoint);

&amp;nbsp;&amp;nbsp; //Subtract the size of the infoWindow, including a buffer.
&amp;nbsp;&amp;nbsp; //This will show whether the infoWindow would spill out of the current view.
&amp;nbsp;&amp;nbsp; var xDiff = Math.abs(maxPointScreen.x - map.infoWindow.coords.x) - 435;
&amp;nbsp;&amp;nbsp; var yDiff = Math.abs(maxPointScreen.y - map.infoWindow.coords.y) - 285;

&amp;nbsp;&amp;nbsp; //If required, recalculate a new centerpoint which accounts for the infoWindow
&amp;nbsp;&amp;nbsp; if (xDiff &amp;lt; 0) {centerPointScreen.x -= xDiff;}
&amp;nbsp;&amp;nbsp; if (yDiff &amp;lt; 0) {centerPointScreen.y += yDiff;}
&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp; //Pan the map to the new centerpoint (in map coordinates)
&amp;nbsp;&amp;nbsp; centerPoint = map.toMap(centerPointScreen);
&amp;nbsp;&amp;nbsp; map.centerAt(centerPoint);
});
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 04:36:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/editor-widget/m-p/679011#M63298</guid>
      <dc:creator>JohnGravois</dc:creator>
      <dc:date>2021-12-12T04:36:49Z</dc:date>
    </item>
  </channel>
</rss>

