{"action":"created","comment":{"url":"https://api.github.com/repos/resource-watch/prep-app/pulls/comments/78608819","id":78608819,"diff_hunk":"@@ -130,9 +131,20 @@ class ExploreMap extends React.Component {\n \n   changeLayerOrder(dataset) {\n     const layer = this.mapLayers[dataset.layers[0].layer_id];\n-    if (dataset.index !== undefined && layer && typeof layer.setZIndex === 'function') {\n-      layer.index = dataset.index;\n-      layer.setZIndex(dataset.index);\n+    if (dataset.index !== undefined && layer) {\n+      if (typeof layer.setZIndex === 'function') {\n+        layer.index = dataset.index;\n+        layer.setZIndex(dataset.index);\n+      } else {\n+        const layerId = dataset.layers[0].layer_id;\n+        const layersElements = this.map.getPane('tilePane').children;\n+        for (let i = 0; i < layersElements.length; i++) {\n+          if (layersElements[i].id === layerId) {\n+            layersElements[i].style.zIndex = dataset.index;","path":"app/scripts/components/Explore/ExploreMap.jsx","position":24,"original_position":24,"commit_id":"50b157e39fe8dea14639cf82ed6c18edc94baf4b","original_commit_id":"50b157e39fe8dea14639cf82ed6c18edc94baf4b","user":{"login":"j8seangel","id":10500650,"avatar_url":"https://avatars.githubusercontent.com/u/10500650?v=3","gravatar_id":"","url":"https://api.github.com/users/j8seangel","html_url":"https://github.com/j8seangel","followers_url":"https://api.github.com/users/j8seangel/followers","following_url":"https://api.github.com/users/j8seangel/following{/other_user}","gists_url":"https://api.github.com/users/j8seangel/gists{/gist_id}","starred_url":"https://api.github.com/users/j8seangel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/j8seangel/subscriptions","organizations_url":"https://api.github.com/users/j8seangel/orgs","repos_url":"https://api.github.com/users/j8seangel/repos","events_url":"https://api.github.com/users/j8seangel/events{/privacy}","received_events_url":"https://api.github.com/users/j8seangel/received_events","type":"User","site_admin":false},"body":"A `break` here will be useful ","created_at":"2016-09-13T17:43:35Z","updated_at":"2016-09-13T17:43:35Z","html_url":"https://github.com/resource-watch/prep-app/pull/42#discussion_r78608819","pull_request_url":"https://api.github.com/repos/resource-watch/prep-app/pulls/42","_links":{"self":{"href":"https://api.github.com/repos/resource-watch/prep-app/pulls/comments/78608819"},"html":{"href":"https://github.com/resource-watch/prep-app/pull/42#discussion_r78608819"},"pull_request":{"href":"https://api.github.com/repos/resource-watch/prep-app/pulls/42"}}},"pull_request":{"url":"https://api.github.com/repos/resource-watch/prep-app/pulls/42","id":85079520,"html_url":"https://github.com/resource-watch/prep-app/pull/42","diff_url":"https://github.com/resource-watch/prep-app/pull/42.diff","patch_url":"https://github.com/resource-watch/prep-app/pull/42.patch","issue_url":"https://api.github.com/repos/resource-watch/prep-app/issues/42","number":42,"state":"open","locked":false,"title":"Fix issue where the overlay image layers werent able to change position","user":{"login":"sorodrigo","id":12124839,"avatar_url":"https://avatars.githubusercontent.com/u/12124839?v=3","gravatar_id":"","url":"https://api.github.com/users/sorodrigo","html_url":"https://github.com/sorodrigo","followers_url":"https://api.github.com/users/sorodrigo/followers","following_url":"https://api.github.com/users/sorodrigo/following{/other_user}","gists_url":"https://api.github.com/users/sorodrigo/gists{/gist_id}","starred_url":"https://api.github.com/users/sorodrigo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sorodrigo/subscriptions","organizations_url":"https://api.github.com/users/sorodrigo/orgs","repos_url":"https://api.github.com/users/sorodrigo/repos","events_url":"https://api.github.com/users/sorodrigo/events{/privacy}","received_events_url":"https://api.github.com/users/sorodrigo/received_events","type":"User","site_admin":false},"body":"This Pull request contains:\r\n- Changes to the **Explorer Map** component that allows the user to set the order in which the layers are placed in to of each other.\r\n\r\n- Set the layer.option.pane value to _tilePane_ on all layers in order to place them in the same html block.\r\n\r\n- If the layer doesn't have a _setZIndex_ method, locates the layer's parent with the _map.getPane_ method.\r\n","created_at":"2016-09-13T16:15:55Z","updated_at":"2016-09-13T17:43:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a6521c3c0522b756b51b5fec060053650f17c694","assignee":{"login":"j8seangel","id":10500650,"avatar_url":"https://avatars.githubusercontent.com/u/10500650?v=3","gravatar_id":"","url":"https://api.github.com/users/j8seangel","html_url":"https://github.com/j8seangel","followers_url":"https://api.github.com/users/j8seangel/followers","following_url":"https://api.github.com/users/j8seangel/following{/other_user}","gists_url":"https://api.github.com/users/j8seangel/gists{/gist_id}","starred_url":"https://api.github.com/users/j8seangel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/j8seangel/subscriptions","organizations_url":"https://api.github.com/users/j8seangel/orgs","repos_url":"https://api.github.com/users/j8seangel/repos","events_url":"https://api.github.com/users/j8seangel/events{/privacy}","received_events_url":"https://api.github.com/users/j8seangel/received_events","type":"User","site_admin":false},"assignees":[{"login":"j8seangel","id":10500650,"avatar_url":"https://avatars.githubusercontent.com/u/10500650?v=3","gravatar_id":"","url":"https://api.github.com/users/j8seangel","html_url":"https://github.com/j8seangel","followers_url":"https://api.github.com/users/j8seangel/followers","following_url":"https://api.github.com/users/j8seangel/following{/other_user}","gists_url":"https://api.github.com/users/j8seangel/gists{/gist_id}","starred_url":"https://api.github.com/users/j8seangel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/j8seangel/subscriptions","organizations_url":"https://api.github.com/users/j8seangel/orgs","repos_url":"https://api.github.com/users/j8seangel/repos","events_url":"https://api.github.com/users/j8seangel/events{/privacy}","received_events_url":"https://api.github.com/users/j8seangel/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/resource-watch/prep-app/pulls/42/commits","review_comments_url":"https://api.github.com/repos/resource-watch/prep-app/pulls/42/comments","review_comment_url":"https://api.github.com/repos/resource-watch/prep-app/pulls/comments{/number}","comments_url":"https://api.github.com/repos/resource-watch/prep-app/issues/42/comments","statuses_url":"https://api.github.com/repos/resource-watch/prep-app/statuses/50b157e39fe8dea14639cf82ed6c18edc94baf4b","head":{"label":"resource-watch:feature/explore-map-order-layer","ref":"feature/explore-map-order-layer","sha":"50b157e39fe8dea14639cf82ed6c18edc94baf4b","user":{"login":"resource-watch","id":18593980,"avatar_url":"https://avatars.githubusercontent.com/u/18593980?v=3","gravatar_id":"","url":"https://api.github.com/users/resource-watch","html_url":"https://github.com/resource-watch","followers_url":"https://api.github.com/users/resource-watch/followers","following_url":"https://api.github.com/users/resource-watch/following{/other_user}","gists_url":"https://api.github.com/users/resource-watch/gists{/gist_id}","starred_url":"https://api.github.com/users/resource-watch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/resource-watch/subscriptions","organizations_url":"https://api.github.com/users/resource-watch/orgs","repos_url":"https://api.github.com/users/resource-watch/repos","events_url":"https://api.github.com/users/resource-watch/events{/privacy}","received_events_url":"https://api.github.com/users/resource-watch/received_events","type":"Organization","site_admin":false},"repo":{"id":63167592,"name":"prep-app","full_name":"resource-watch/prep-app","owner":{"login":"resource-watch","id":18593980,"avatar_url":"https://avatars.githubusercontent.com/u/18593980?v=3","gravatar_id":"","url":"https://api.github.com/users/resource-watch","html_url":"https://github.com/resource-watch","followers_url":"https://api.github.com/users/resource-watch/followers","following_url":"https://api.github.com/users/resource-watch/following{/other_user}","gists_url":"https://api.github.com/users/resource-watch/gists{/gist_id}","starred_url":"https://api.github.com/users/resource-watch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/resource-watch/subscriptions","organizations_url":"https://api.github.com/users/resource-watch/orgs","repos_url":"https://api.github.com/users/resource-watch/repos","events_url":"https://api.github.com/users/resource-watch/events{/privacy}","received_events_url":"https://api.github.com/users/resource-watch/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/resource-watch/prep-app","description":"The Climate Partnership for Resilience and Preparedness (C-PREP) is a public-private collaboration whose mission is to help planners, investors, and resource managers around the globe rapidly assess and incorporate climate risks into their decisions by enhancing access to the best available data, and insights on climate change.","fork":false,"url":"https://api.github.com/repos/resource-watch/prep-app","forks_url":"https://api.github.com/repos/resource-watch/prep-app/forks","keys_url":"https://api.github.com/repos/resource-watch/prep-app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/resource-watch/prep-app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/resource-watch/prep-app/teams","hooks_url":"https://api.github.com/repos/resource-watch/prep-app/hooks","issue_events_url":"https://api.github.com/repos/resource-watch/prep-app/issues/events{/number}","events_url":"https://api.github.com/repos/resource-watch/prep-app/events","assignees_url":"https://api.github.com/repos/resource-watch/prep-app/assignees{/user}","branches_url":"https://api.github.com/repos/resource-watch/prep-app/branches{/branch}","tags_url":"https://api.github.com/repos/resource-watch/prep-app/tags","blobs_url":"https://api.github.com/repos/resource-watch/prep-app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/resource-watch/prep-app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/resource-watch/prep-app/git/refs{/sha}","trees_url":"https://api.github.com/repos/resource-watch/prep-app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/resource-watch/prep-app/statuses/{sha}","languages_url":"https://api.github.com/repos/resource-watch/prep-app/languages","stargazers_url":"https://api.github.com/repos/resource-watch/prep-app/stargazers","contributors_url":"https://api.github.com/repos/resource-watch/prep-app/contributors","subscribers_url":"https://api.github.com/repos/resource-watch/prep-app/subscribers","subscription_url":"https://api.github.com/repos/resource-watch/prep-app/subscription","commits_url":"https://api.github.com/repos/resource-watch/prep-app/commits{/sha}","git_commits_url":"https://api.github.com/repos/resource-watch/prep-app/git/commits{/sha}","comments_url":"https://api.github.com/repos/resource-watch/prep-app/comments{/number}","issue_comment_url":"https://api.github.com/repos/resource-watch/prep-app/issues/comments{/number}","contents_url":"https://api.github.com/repos/resource-watch/prep-app/contents/{+path}","compare_url":"https://api.github.com/repos/resource-watch/prep-app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/resource-watch/prep-app/merges","archive_url":"https://api.github.com/repos/resource-watch/prep-app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/resource-watch/prep-app/downloads","issues_url":"https://api.github.com/repos/resource-watch/prep-app/issues{/number}","pulls_url":"https://api.github.com/repos/resource-watch/prep-app/pulls{/number}","milestones_url":"https://api.github.com/repos/resource-watch/prep-app/milestones{/number}","notifications_url":"https://api.github.com/repos/resource-watch/prep-app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/resource-watch/prep-app/labels{/name}","releases_url":"https://api.github.com/repos/resource-watch/prep-app/releases{/id}","deployments_url":"https://api.github.com/repos/resource-watch/prep-app/deployments","created_at":"2016-07-12T15:03:10Z","updated_at":"2016-08-29T09:57:32Z","pushed_at":"2016-09-13T17:34:19Z","git_url":"git://github.com/resource-watch/prep-app.git","ssh_url":"git@github.com:resource-watch/prep-app.git","clone_url":"https://github.com/resource-watch/prep-app.git","svn_url":"https://github.com/resource-watch/prep-app","homepage":"","size":13462,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":3,"forks":5,"open_issues":3,"watchers":0,"default_branch":"master"}},"base":{"label":"resource-watch:develop","ref":"develop","sha":"f11535fae04b96ef2dea6b9e816d9a79be747828","user":{"login":"resource-watch","id":18593980,"avatar_url":"https://avatars.githubusercontent.com/u/18593980?v=3","gravatar_id":"","url":"https://api.github.com/users/resource-watch","html_url":"https://github.com/resource-watch","followers_url":"https://api.github.com/users/resource-watch/followers","following_url":"https://api.github.com/users/resource-watch/following{/other_user}","gists_url":"https://api.github.com/users/resource-watch/gists{/gist_id}","starred_url":"https://api.github.com/users/resource-watch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/resource-watch/subscriptions","organizations_url":"https://api.github.com/users/resource-watch/orgs","repos_url":"https://api.github.com/users/resource-watch/repos","events_url":"https://api.github.com/users/resource-watch/events{/privacy}","received_events_url":"https://api.github.com/users/resource-watch/received_events","type":"Organization","site_admin":false},"repo":{"id":63167592,"name":"prep-app","full_name":"resource-watch/prep-app","owner":{"login":"resource-watch","id":18593980,"avatar_url":"https://avatars.githubusercontent.com/u/18593980?v=3","gravatar_id":"","url":"https://api.github.com/users/resource-watch","html_url":"https://github.com/resource-watch","followers_url":"https://api.github.com/users/resource-watch/followers","following_url":"https://api.github.com/users/resource-watch/following{/other_user}","gists_url":"https://api.github.com/users/resource-watch/gists{/gist_id}","starred_url":"https://api.github.com/users/resource-watch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/resource-watch/subscriptions","organizations_url":"https://api.github.com/users/resource-watch/orgs","repos_url":"https://api.github.com/users/resource-watch/repos","events_url":"https://api.github.com/users/resource-watch/events{/privacy}","received_events_url":"https://api.github.com/users/resource-watch/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/resource-watch/prep-app","description":"The Climate Partnership for Resilience and Preparedness (C-PREP) is a public-private collaboration whose mission is to help planners, investors, and resource managers around the globe rapidly assess and incorporate climate risks into their decisions by enhancing access to the best available data, and insights on climate change.","fork":false,"url":"https://api.github.com/repos/resource-watch/prep-app","forks_url":"https://api.github.com/repos/resource-watch/prep-app/forks","keys_url":"https://api.github.com/repos/resource-watch/prep-app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/resource-watch/prep-app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/resource-watch/prep-app/teams","hooks_url":"https://api.github.com/repos/resource-watch/prep-app/hooks","issue_events_url":"https://api.github.com/repos/resource-watch/prep-app/issues/events{/number}","events_url":"https://api.github.com/repos/resource-watch/prep-app/events","assignees_url":"https://api.github.com/repos/resource-watch/prep-app/assignees{/user}","branches_url":"https://api.github.com/repos/resource-watch/prep-app/branches{/branch}","tags_url":"https://api.github.com/repos/resource-watch/prep-app/tags","blobs_url":"https://api.github.com/repos/resource-watch/prep-app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/resource-watch/prep-app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/resource-watch/prep-app/git/refs{/sha}","trees_url":"https://api.github.com/repos/resource-watch/prep-app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/resource-watch/prep-app/statuses/{sha}","languages_url":"https://api.github.com/repos/resource-watch/prep-app/languages","stargazers_url":"https://api.github.com/repos/resource-watch/prep-app/stargazers","contributors_url":"https://api.github.com/repos/resource-watch/prep-app/contributors","subscribers_url":"https://api.github.com/repos/resource-watch/prep-app/subscribers","subscription_url":"https://api.github.com/repos/resource-watch/prep-app/subscription","commits_url":"https://api.github.com/repos/resource-watch/prep-app/commits{/sha}","git_commits_url":"https://api.github.com/repos/resource-watch/prep-app/git/commits{/sha}","comments_url":"https://api.github.com/repos/resource-watch/prep-app/comments{/number}","issue_comment_url":"https://api.github.com/repos/resource-watch/prep-app/issues/comments{/number}","contents_url":"https://api.github.com/repos/resource-watch/prep-app/contents/{+path}","compare_url":"https://api.github.com/repos/resource-watch/prep-app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/resource-watch/prep-app/merges","archive_url":"https://api.github.com/repos/resource-watch/prep-app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/resource-watch/prep-app/downloads","issues_url":"https://api.github.com/repos/resource-watch/prep-app/issues{/number}","pulls_url":"https://api.github.com/repos/resource-watch/prep-app/pulls{/number}","milestones_url":"https://api.github.com/repos/resource-watch/prep-app/milestones{/number}","notifications_url":"https://api.github.com/repos/resource-watch/prep-app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/resource-watch/prep-app/labels{/name}","releases_url":"https://api.github.com/repos/resource-watch/prep-app/releases{/id}","deployments_url":"https://api.github.com/repos/resource-watch/prep-app/deployments","created_at":"2016-07-12T15:03:10Z","updated_at":"2016-08-29T09:57:32Z","pushed_at":"2016-09-13T17:34:19Z","git_url":"git://github.com/resource-watch/prep-app.git","ssh_url":"git@github.com:resource-watch/prep-app.git","clone_url":"https://github.com/resource-watch/prep-app.git","svn_url":"https://github.com/resource-watch/prep-app","homepage":"","size":13462,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":3,"forks":5,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/resource-watch/prep-app/pulls/42"},"html":{"href":"https://github.com/resource-watch/prep-app/pull/42"},"issue":{"href":"https://api.github.com/repos/resource-watch/prep-app/issues/42"},"comments":{"href":"https://api.github.com/repos/resource-watch/prep-app/issues/42/comments"},"review_comments":{"href":"https://api.github.com/repos/resource-watch/prep-app/pulls/42/comments"},"review_comment":{"href":"https://api.github.com/repos/resource-watch/prep-app/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/resource-watch/prep-app/pulls/42/commits"},"statuses":{"href":"https://api.github.com/repos/resource-watch/prep-app/statuses/50b157e39fe8dea14639cf82ed6c18edc94baf4b"}}}}
{"actor":{"display_login":"j8seangel"}}