<?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 Re: Moveble LayerList in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/moveble-layerlist/m-p/430396#M39593</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You&amp;nbsp;may be able to&amp;nbsp;add drag and drop to move layers around using a third party library.&amp;nbsp; This looks promising:&amp;nbsp;&lt;A class="link-titled" href="https://github.com/Shopify/draggable" title="https://github.com/Shopify/draggable"&gt;GitHub - Shopify/draggable: The JavaScript Drag &amp;amp; Drop library your grandparents warned you about.&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I played around with this for a little bit and here's what I ended up with: &lt;A class="link-titled" href="https://codepen.io/solowt/pen/yPeeeL?editors=1000#0" title="https://codepen.io/solowt/pen/yPeeeL?editors=1000#0"&gt;https://codepen.io/solowt/pen/yPeeeL?editors=1000#0&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This isn't working completely.&amp;nbsp; There is some logical&amp;nbsp;problem with how the layers are reordered.&amp;nbsp; I'm not sure where the issue is but if you really want this feature&amp;nbsp;it should be doable with&amp;nbsp;some&amp;nbsp;work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One thing I noticed is that I needed to push each swap event onto an array and then apply the changes after the user stopped dragging the layer element.&amp;nbsp; The logical problem may be involved with how the new index is determined.&amp;nbsp; I'll take a further look if I get a chance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 02 Nov 2017 15:05:25 GMT</pubDate>
    <dc:creator>ThomasSolow</dc:creator>
    <dc:date>2017-11-02T15:05:25Z</dc:date>
    <item>
      <title>Moveble LayerList</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/moveble-layerlist/m-p/430392#M39589</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to make LayerList widget movable, The problem I face if user click on LayerList(On some layer) and move it,&amp;nbsp; Layer list consider the user clicks on the Layer and toggle the visibility of the layer.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to avoid the toggle visibility when user move the widget.&lt;/P&gt;&lt;P&gt;I tried to get the click action of the layerList but no success.&lt;/P&gt;&lt;P&gt;Is there any way to solve it.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also Is there any way to allow users to change the order of the layers by dragging layers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Oct 2017 15:48:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/moveble-layerlist/m-p/430392#M39589</guid>
      <dc:creator>aymansalah</dc:creator>
      <dc:date>2017-10-30T15:48:09Z</dc:date>
    </item>
    <item>
      <title>Re: Moveble LayerList</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/moveble-layerlist/m-p/430393#M39590</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ayman,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;How are you make the LayerList movable? If using dojo dnd then you should just add a header portion and set the dnd handle to be the header div.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Oct 2017 16:18:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/moveble-layerlist/m-p/430393#M39590</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2017-10-30T16:18:09Z</dc:date>
    </item>
    <item>
      <title>Re: Moveble LayerList</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/moveble-layerlist/m-p/430394#M39591</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's a good idea.&lt;/P&gt;&lt;P&gt;I allowed the user to click anywhere on the layerlist and move it.&amp;nbsp; If I could replace the layer click function it would be good to add some custom code,&lt;/P&gt;&lt;P&gt;what about allowing the user to drag layers to reorder layers?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Oct 2017 16:24:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/moveble-layerlist/m-p/430394#M39591</guid>
      <dc:creator>aymansalah</dc:creator>
      <dc:date>2017-10-30T16:24:16Z</dc:date>
    </item>
    <item>
      <title>Re: Moveble LayerList</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/moveble-layerlist/m-p/430395#M39592</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That would be very complicated. I don't have advice for that.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Oct 2017 16:25:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/moveble-layerlist/m-p/430395#M39592</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2017-10-30T16:25:52Z</dc:date>
    </item>
    <item>
      <title>Re: Moveble LayerList</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/moveble-layerlist/m-p/430396#M39593</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You&amp;nbsp;may be able to&amp;nbsp;add drag and drop to move layers around using a third party library.&amp;nbsp; This looks promising:&amp;nbsp;&lt;A class="link-titled" href="https://github.com/Shopify/draggable" title="https://github.com/Shopify/draggable"&gt;GitHub - Shopify/draggable: The JavaScript Drag &amp;amp; Drop library your grandparents warned you about.&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I played around with this for a little bit and here's what I ended up with: &lt;A class="link-titled" href="https://codepen.io/solowt/pen/yPeeeL?editors=1000#0" title="https://codepen.io/solowt/pen/yPeeeL?editors=1000#0"&gt;https://codepen.io/solowt/pen/yPeeeL?editors=1000#0&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This isn't working completely.&amp;nbsp; There is some logical&amp;nbsp;problem with how the layers are reordered.&amp;nbsp; I'm not sure where the issue is but if you really want this feature&amp;nbsp;it should be doable with&amp;nbsp;some&amp;nbsp;work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One thing I noticed is that I needed to push each swap event onto an array and then apply the changes after the user stopped dragging the layer element.&amp;nbsp; The logical problem may be involved with how the new index is determined.&amp;nbsp; I'll take a further look if I get a chance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Nov 2017 15:05:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/moveble-layerlist/m-p/430396#M39593</guid>
      <dc:creator>ThomasSolow</dc:creator>
      <dc:date>2017-11-02T15:05:25Z</dc:date>
    </item>
  </channel>
</rss>

