<?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 Auto resize map div/container to 100% after a content pane is removed from the layout in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/auto-resize-map-div-container-to-100-after-a/m-p/177557#M16462</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Been at this for hours and I can't seem to figure it out.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm using AG-JSAPI 3.6&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a map layout with a bordercontainer and two contentpanes, One is the map div and the other is the left div (which holds the legend, and basemaps and such as child elements).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anyway, I have a checkbox element on the footer that when clicked, fires off a function that (should ideally) make the left div disappear and the map div expand to the width of the browser. The left div disappears as it should without any issue. However, the map div stays put. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; function toggleDiv() { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // If statement to check if the checkbox is checked.&amp;nbsp; if (dijit.byId("ToggleLeft").checked) { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Sets the left div's display CSS property to inline and then setting the &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //width property &amp;nbsp;&amp;nbsp;&amp;nbsp; dojo.setStyle(dijit.byId("leftDiv").domNode, 'display', 'inline'); &amp;nbsp;&amp;nbsp;&amp;nbsp; dojo.byId("leftDiv").style.width = '285px';&amp;nbsp;&amp;nbsp; }&amp;nbsp; else&amp;nbsp; { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Sets the display css property to "none" which makes the element disappear&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; dojo.setStyle(dijit.byId("leftDiv").domNode, 'display', 'none');&amp;nbsp;&amp;nbsp; };&amp;nbsp; }&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The thing is, when I resize the browser, the map automatically resizes to the width of the browser. However, I want to do this as soon as the leftDiv element disappears. What js code would I have to use to get this to happen? Any help would be appreciated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 30 Aug 2013 15:52:19 GMT</pubDate>
    <dc:creator>RuchiraWelikala</dc:creator>
    <dc:date>2013-08-30T15:52:19Z</dc:date>
    <item>
      <title>Auto resize map div/container to 100% after a content pane is removed from the layout</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/auto-resize-map-div-container-to-100-after-a/m-p/177557#M16462</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Been at this for hours and I can't seem to figure it out.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm using AG-JSAPI 3.6&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a map layout with a bordercontainer and two contentpanes, One is the map div and the other is the left div (which holds the legend, and basemaps and such as child elements).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anyway, I have a checkbox element on the footer that when clicked, fires off a function that (should ideally) make the left div disappear and the map div expand to the width of the browser. The left div disappears as it should without any issue. However, the map div stays put. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; function toggleDiv() { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // If statement to check if the checkbox is checked.&amp;nbsp; if (dijit.byId("ToggleLeft").checked) { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Sets the left div's display CSS property to inline and then setting the &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //width property &amp;nbsp;&amp;nbsp;&amp;nbsp; dojo.setStyle(dijit.byId("leftDiv").domNode, 'display', 'inline'); &amp;nbsp;&amp;nbsp;&amp;nbsp; dojo.byId("leftDiv").style.width = '285px';&amp;nbsp;&amp;nbsp; }&amp;nbsp; else&amp;nbsp; { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Sets the display css property to "none" which makes the element disappear&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; dojo.setStyle(dijit.byId("leftDiv").domNode, 'display', 'none');&amp;nbsp;&amp;nbsp; };&amp;nbsp; }&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The thing is, when I resize the browser, the map automatically resizes to the width of the browser. However, I want to do this as soon as the leftDiv element disappears. What js code would I have to use to get this to happen? Any help would be appreciated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Aug 2013 15:52:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/auto-resize-map-div-container-to-100-after-a/m-p/177557#M16462</guid>
      <dc:creator>RuchiraWelikala</dc:creator>
      <dc:date>2013-08-30T15:52:19Z</dc:date>
    </item>
    <item>
      <title>Re: Auto resize map div/container to 100% after a content pane is removed from the la</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/auto-resize-map-div-container-to-100-after-a/m-p/177558#M16463</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You have to call resize method of the borderContainer object when any of the child elements resized. Add the below line to the end of the function.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;dijit.byId("borderContainerID").resize();&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Aug 2013 16:05:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/auto-resize-map-div-container-to-100-after-a/m-p/177558#M16463</guid>
      <dc:creator>JasonZou</dc:creator>
      <dc:date>2013-08-30T16:05:35Z</dc:date>
    </item>
    <item>
      <title>Re: Auto resize map div/container to 100% after a content pane is removed from the la</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/auto-resize-map-div-container-to-100-after-a/m-p/177559#M16464</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;You have to call resize method of the borderContainer object when any of the child elements resized. Add the below line to the end of the function.&lt;BR /&gt;&lt;BR /&gt;dijit.byId("borderContainerID").resize();&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Wow,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I can't believe I missed that!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks so much, Jason.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Aug 2013 16:41:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/auto-resize-map-div-container-to-100-after-a/m-p/177559#M16464</guid>
      <dc:creator>RuchiraWelikala</dc:creator>
      <dc:date>2013-08-30T16:41:54Z</dc:date>
    </item>
  </channel>
</rss>

