<?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 Watch on LayerList Not Working 4.3 in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/watch-on-layerlist-not-working-4-3/m-p/341556#M31591</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have the following code and nothing happens when the LayerList updates. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var layerList = new LayerList({&lt;BR /&gt; view: view,&lt;BR /&gt; container: "layers",&lt;BR /&gt; createActionsFunction: defineActions&lt;BR /&gt; &lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;var listChanged = layerList.watch('operationalItems.length', function (length) {&lt;BR /&gt; console.log("New item added or item removed. Length " + length);&lt;BR /&gt; fixPopupsInList(layerList.operationalItems);&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wan to change the color of the titles to indicate the popup is enabled (works fine) when a new layer is added, but the refresh of list &amp;nbsp;removes the color indicator, so was thinking of reapplying color when popupEnabled == true on each add, but the above watch doesn't work for some reason. &amp;nbsp;Any ideas? &amp;nbsp;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I realize there are several workarounds, but want to understand why watch(obj, callback) isn't working and use it if can.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 01 May 2017 16:38:37 GMT</pubDate>
    <dc:creator>RaymondIrwin</dc:creator>
    <dc:date>2017-05-01T16:38:37Z</dc:date>
    <item>
      <title>Watch on LayerList Not Working 4.3</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/watch-on-layerlist-not-working-4-3/m-p/341556#M31591</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have the following code and nothing happens when the LayerList updates. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var layerList = new LayerList({&lt;BR /&gt; view: view,&lt;BR /&gt; container: "layers",&lt;BR /&gt; createActionsFunction: defineActions&lt;BR /&gt; &lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;var listChanged = layerList.watch('operationalItems.length', function (length) {&lt;BR /&gt; console.log("New item added or item removed. Length " + length);&lt;BR /&gt; fixPopupsInList(layerList.operationalItems);&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wan to change the color of the titles to indicate the popup is enabled (works fine) when a new layer is added, but the refresh of list &amp;nbsp;removes the color indicator, so was thinking of reapplying color when popupEnabled == true on each add, but the above watch doesn't work for some reason. &amp;nbsp;Any ideas? &amp;nbsp;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I realize there are several workarounds, but want to understand why watch(obj, callback) isn't working and use it if can.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 May 2017 16:38:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/watch-on-layerlist-not-working-4-3/m-p/341556#M31591</guid>
      <dc:creator>RaymondIrwin</dc:creator>
      <dc:date>2017-05-01T16:38:37Z</dc:date>
    </item>
    <item>
      <title>Re: Watch on LayerList Not Working 4.3</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/watch-on-layerlist-not-working-4-3/m-p/341557#M31592</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Worked for me in this example where I remove a layer from the list&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://jsbin.com/vajefifice/edit?html,console,output" title="http://jsbin.com/vajefifice/edit?html,console,output"&gt;JS Bin - Collaborative JavaScript Debugging&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 May 2017 01:04:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/watch-on-layerlist-not-working-4-3/m-p/341557#M31592</guid>
      <dc:creator>KellyHutchins</dc:creator>
      <dc:date>2017-05-02T01:04:37Z</dc:date>
    </item>
  </channel>
</rss>

