{"action":"created","issue":{"url":"https://api.github.com/repos/CoastalResilienceNetwork/GeositeFramework/issues/705","repository_url":"https://api.github.com/repos/CoastalResilienceNetwork/GeositeFramework","labels_url":"https://api.github.com/repos/CoastalResilienceNetwork/GeositeFramework/issues/705/labels{/name}","comments_url":"https://api.github.com/repos/CoastalResilienceNetwork/GeositeFramework/issues/705/comments","events_url":"https://api.github.com/repos/CoastalResilienceNetwork/GeositeFramework/issues/705/events","html_url":"https://github.com/CoastalResilienceNetwork/GeositeFramework/pull/705","id":184242792,"number":705,"title":"Toggle plugin layers on eye-icon button click","user":{"login":"kellyi","id":4165523,"avatar_url":"https://avatars.githubusercontent.com/u/4165523?v=3","gravatar_id":"","url":"https://api.github.com/users/kellyi","html_url":"https://github.com/kellyi","followers_url":"https://api.github.com/users/kellyi/followers","following_url":"https://api.github.com/users/kellyi/following{/other_user}","gists_url":"https://api.github.com/users/kellyi/gists{/gist_id}","starred_url":"https://api.github.com/users/kellyi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kellyi/subscriptions","organizations_url":"https://api.github.com/users/kellyi/orgs","repos_url":"https://api.github.com/users/kellyi/repos","events_url":"https://api.github.com/users/kellyi/events{/privacy}","received_events_url":"https://api.github.com/users/kellyi/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/CoastalResilienceNetwork/GeositeFramework/labels/in%20progress","name":"in progress","color":"ededed"}],"state":"open","locked":false,"assignee":{"login":"caseypt","id":1042475,"avatar_url":"https://avatars.githubusercontent.com/u/1042475?v=3","gravatar_id":"","url":"https://api.github.com/users/caseypt","html_url":"https://github.com/caseypt","followers_url":"https://api.github.com/users/caseypt/followers","following_url":"https://api.github.com/users/caseypt/following{/other_user}","gists_url":"https://api.github.com/users/caseypt/gists{/gist_id}","starred_url":"https://api.github.com/users/caseypt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caseypt/subscriptions","organizations_url":"https://api.github.com/users/caseypt/orgs","repos_url":"https://api.github.com/users/caseypt/repos","events_url":"https://api.github.com/users/caseypt/events{/privacy}","received_events_url":"https://api.github.com/users/caseypt/received_events","type":"User","site_admin":false},"assignees":[{"login":"caseypt","id":1042475,"avatar_url":"https://avatars.githubusercontent.com/u/1042475?v=3","gravatar_id":"","url":"https://api.github.com/users/caseypt","html_url":"https://github.com/caseypt","followers_url":"https://api.github.com/users/caseypt/followers","following_url":"https://api.github.com/users/caseypt/following{/other_user}","gists_url":"https://api.github.com/users/caseypt/gists{/gist_id}","starred_url":"https://api.github.com/users/caseypt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caseypt/subscriptions","organizations_url":"https://api.github.com/users/caseypt/orgs","repos_url":"https://api.github.com/users/caseypt/repos","events_url":"https://api.github.com/users/caseypt/events{/privacy}","received_events_url":"https://api.github.com/users/caseypt/received_events","type":"User","site_admin":false}],"milestone":null,"comments":6,"created_at":"2016-10-20T14:18:51Z","updated_at":"2016-10-20T16:24:12Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/CoastalResilienceNetwork/GeositeFramework/pulls/705","html_url":"https://github.com/CoastalResilienceNetwork/GeositeFramework/pull/705","diff_url":"https://github.com/CoastalResilienceNetwork/GeositeFramework/pull/705.diff","patch_url":"https://github.com/CoastalResilienceNetwork/GeositeFramework/pull/705.patch"},"body":"This PR wires up the eye-icon button to show and hide a plugin's layers on clicking the eye-icon button. Per #694, the desired behavior for this button is that it toggles a plugin's layers on and off on the map and in the legend on click, but does not otherwise reset the state of the plugin. \r\n\r\nTo handle this, I added a new `toggleLayers` method to `plugins.js`, plus some variables to store the state of the toggling and the layers to return to the map when they're toggled back on. The result currently works like this:\r\n\r\n*After adding layers from ECA and Regional Planning plugins:*\r\n\r\n![screen shot 2016-10-20 at 10 08 04 am](https://cloud.githubusercontent.com/assets/4165523/19563222/3cd2d0c6-96ad-11e6-8787-994af0917380.png)\r\n\r\n*After clicking the eye-icon button in the Regional Planning plugin:*\r\n\r\n![screen shot 2016-10-20 at 10 08 20 am](https://cloud.githubusercontent.com/assets/4165523/19563242/4e7098c2-96ad-11e6-85a7-66b5740d5f52.png)\r\n\r\n*After clicking the Regional Planning eye-icon button again:*\r\n\r\n![screen shot 2016-10-20 at 10 08 31 am](https://cloud.githubusercontent.com/assets/4165523/19563262/5a715ea4-96ad-11e6-8832-4f7a62145a93.png)\r\n\r\nThe second commit here removes a drag event listener from the sidebar plugins which would cause them to be banished out of the viewport if a user dragged while clicking. This functionality's no longer necessary since the sidebar plugins now occupy a fixed spot in the viewport when selected.\r\n\r\n**Testing**\r\n- get this branch, install the ECA and Regional Planning plugins, then build the project in Visual Studio\r\n- view the project in Google Chrome and open the browser console\r\n- toggle some layers on in ECA and some in Regional Planning\r\n- click the eye-icon in Regional Planning and verify that its layers have been removed from the map and the legend but that the state of the plugin itself has not been reset and that the layers from ECA remain on the map and in the legend\r\n- click the eye-icon button again to toggle its layers back on and confirm that they show in the map and legend\r\n- repeat these steps with ECA\r\n- try some additional combos of toggling on and off between plugins and verify that the app doesn't end up in a non-working state\r\n- try to click and drag the header bar for the plugins and verify that nothing happens\r\n\r\nConnects #694 "},"comment":{"url":"https://api.github.com/repos/CoastalResilienceNetwork/GeositeFramework/issues/comments/255155920","html_url":"https://github.com/CoastalResilienceNetwork/GeositeFramework/pull/705#issuecomment-255155920","issue_url":"https://api.github.com/repos/CoastalResilienceNetwork/GeositeFramework/issues/705","id":255155920,"user":{"login":"caseypt","id":1042475,"avatar_url":"https://avatars.githubusercontent.com/u/1042475?v=3","gravatar_id":"","url":"https://api.github.com/users/caseypt","html_url":"https://github.com/caseypt","followers_url":"https://api.github.com/users/caseypt/followers","following_url":"https://api.github.com/users/caseypt/following{/other_user}","gists_url":"https://api.github.com/users/caseypt/gists{/gist_id}","starred_url":"https://api.github.com/users/caseypt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caseypt/subscriptions","organizations_url":"https://api.github.com/users/caseypt/orgs","repos_url":"https://api.github.com/users/caseypt/repos","events_url":"https://api.github.com/users/caseypt/events{/privacy}","received_events_url":"https://api.github.com/users/caseypt/received_events","type":"User","site_admin":false},"created_at":"2016-10-20T16:24:11Z","updated_at":"2016-10-20T16:24:11Z","body":"Sounds good."}}
{"actor":{"display_login":"caseypt"}}