{"action":"opened","number":9,"pull_request":{"url":"https://api.github.com/repos/johnvf/adapt-web-ui/pulls/9","id":53034828,"html_url":"https://github.com/johnvf/adapt-web-ui/pull/9","diff_url":"https://github.com/johnvf/adapt-web-ui/pull/9.diff","patch_url":"https://github.com/johnvf/adapt-web-ui/pull/9.patch","issue_url":"https://api.github.com/repos/johnvf/adapt-web-ui/issues/9","number":9,"state":"open","locked":false,"title":"Add tooltip","user":{"login":"bengolder","id":451510,"avatar_url":"https://avatars.githubusercontent.com/u/451510?v=3","gravatar_id":"","url":"https://api.github.com/users/bengolder","html_url":"https://github.com/bengolder","followers_url":"https://api.github.com/users/bengolder/followers","following_url":"https://api.github.com/users/bengolder/following{/other_user}","gists_url":"https://api.github.com/users/bengolder/gists{/gist_id}","starred_url":"https://api.github.com/users/bengolder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bengolder/subscriptions","organizations_url":"https://api.github.com/users/bengolder/orgs","repos_url":"https://api.github.com/users/bengolder/repos","events_url":"https://api.github.com/users/bengolder/events{/privacy}","received_events_url":"https://api.github.com/users/bengolder/received_events","type":"User","site_admin":false},"body":"This adds a tooltip, closing issue #5 .\r\n\r\nThe tooltip still needs some work, which will be addressed in a separate issue.\r\n\r\nThis adds:\r\n\r\n* A `MouseActions` action module, with a `MouseActions.featureHover` action.\r\n* A `UserActionStore` module the `UserActionStore.getHoveredFeatures()` and `UserActionStore.getMapEvent()`\r\n* A `MapTooltip` component that subscribes to `UserActionStore`.\r\n* the `Map.js` component now fires `MouseActions.featureHover` when features are moused over\r\n* `Map.js` now has a wrapping div that includes the `MapTooltip` component alongside the `#map` div.\r\n\r\nTo display information in the tooltip, you need to adjust the map layer's corresponding `.json` file, adding information under `tool_tip_data`. For example, `topography.json` looks like this:\r\n\r\n```\r\n{\r\n  \"name\": \"Topography\",\r\n  \"sources\": {\r\n    \"topo\":{\r\n      \"type\": \"vector\",\r\n      \"url\": \"mapbox://urbanbiofilterdev.anmk296p\"\r\n    }\r\n  },\r\n  \"layers\":  [\r\n    {\r\n      \"source\": \"topo\",\r\n      \"source-layer\": \"topo\",\r\n      \"tool_tip_data\": {\r\n          \"fields\": {\r\n            \"ELEVATION\": \"Elevation\"\r\n            }\r\n      },\r\n      \"interactive\": true,\r\n      \"type\": \"line\",\r\n      \"paint\": {\r\n        \"line-color\": \"#8d8d8d\",\r\n        \"line-width\": \"0.5\"\r\n      }\r\n    },\r\n     {\r\n      \"source\": \"topo\",\r\n      \"source-layer\": \"topo\",\r\n      \"type\": \"symbol\",\r\n        \"text-field\": \"{ELEVATION}\",\r\n        \"symbol-placement\": \"line\"\r\n    }\r\n  ]\r\n}\r\n```","created_at":"2015-12-08T20:36:32Z","updated_at":"2015-12-08T20:36:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/johnvf/adapt-web-ui/pulls/9/commits","review_comments_url":"https://api.github.com/repos/johnvf/adapt-web-ui/pulls/9/comments","review_comment_url":"https://api.github.com/repos/johnvf/adapt-web-ui/pulls/comments{/number}","comments_url":"https://api.github.com/repos/johnvf/adapt-web-ui/issues/9/comments","statuses_url":"https://api.github.com/repos/johnvf/adapt-web-ui/statuses/768a0b19bbc2bbfe4adfb8d6674b2d8ed202a98d","head":{"label":"johnvf:add_tooltip","ref":"add_tooltip","sha":"768a0b19bbc2bbfe4adfb8d6674b2d8ed202a98d","user":{"login":"johnvf","id":6565310,"avatar_url":"https://avatars.githubusercontent.com/u/6565310?v=3","gravatar_id":"","url":"https://api.github.com/users/johnvf","html_url":"https://github.com/johnvf","followers_url":"https://api.github.com/users/johnvf/followers","following_url":"https://api.github.com/users/johnvf/following{/other_user}","gists_url":"https://api.github.com/users/johnvf/gists{/gist_id}","starred_url":"https://api.github.com/users/johnvf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnvf/subscriptions","organizations_url":"https://api.github.com/users/johnvf/orgs","repos_url":"https://api.github.com/users/johnvf/repos","events_url":"https://api.github.com/users/johnvf/events{/privacy}","received_events_url":"https://api.github.com/users/johnvf/received_events","type":"User","site_admin":false},"repo":{"id":46194632,"name":"adapt-web-ui","full_name":"johnvf/adapt-web-ui","owner":{"login":"johnvf","id":6565310,"avatar_url":"https://avatars.githubusercontent.com/u/6565310?v=3","gravatar_id":"","url":"https://api.github.com/users/johnvf","html_url":"https://github.com/johnvf","followers_url":"https://api.github.com/users/johnvf/followers","following_url":"https://api.github.com/users/johnvf/following{/other_user}","gists_url":"https://api.github.com/users/johnvf/gists{/gist_id}","starred_url":"https://api.github.com/users/johnvf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnvf/subscriptions","organizations_url":"https://api.github.com/users/johnvf/orgs","repos_url":"https://api.github.com/users/johnvf/repos","events_url":"https://api.github.com/users/johnvf/events{/privacy}","received_events_url":"https://api.github.com/users/johnvf/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/johnvf/adapt-web-ui","description":"Web UI for Adapt","fork":false,"url":"https://api.github.com/repos/johnvf/adapt-web-ui","forks_url":"https://api.github.com/repos/johnvf/adapt-web-ui/forks","keys_url":"https://api.github.com/repos/johnvf/adapt-web-ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/johnvf/adapt-web-ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/johnvf/adapt-web-ui/teams","hooks_url":"https://api.github.com/repos/johnvf/adapt-web-ui/hooks","issue_events_url":"https://api.github.com/repos/johnvf/adapt-web-ui/issues/events{/number}","events_url":"https://api.github.com/repos/johnvf/adapt-web-ui/events","assignees_url":"https://api.github.com/repos/johnvf/adapt-web-ui/assignees{/user}","branches_url":"https://api.github.com/repos/johnvf/adapt-web-ui/branches{/branch}","tags_url":"https://api.github.com/repos/johnvf/adapt-web-ui/tags","blobs_url":"https://api.github.com/repos/johnvf/adapt-web-ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/johnvf/adapt-web-ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/johnvf/adapt-web-ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/johnvf/adapt-web-ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/johnvf/adapt-web-ui/statuses/{sha}","languages_url":"https://api.github.com/repos/johnvf/adapt-web-ui/languages","stargazers_url":"https://api.github.com/repos/johnvf/adapt-web-ui/stargazers","contributors_url":"https://api.github.com/repos/johnvf/adapt-web-ui/contributors","subscribers_url":"https://api.github.com/repos/johnvf/adapt-web-ui/subscribers","subscription_url":"https://api.github.com/repos/johnvf/adapt-web-ui/subscription","commits_url":"https://api.github.com/repos/johnvf/adapt-web-ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/johnvf/adapt-web-ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/johnvf/adapt-web-ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/johnvf/adapt-web-ui/issues/comments{/number}","contents_url":"https://api.github.com/repos/johnvf/adapt-web-ui/contents/{+path}","compare_url":"https://api.github.com/repos/johnvf/adapt-web-ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/johnvf/adapt-web-ui/merges","archive_url":"https://api.github.com/repos/johnvf/adapt-web-ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/johnvf/adapt-web-ui/downloads","issues_url":"https://api.github.com/repos/johnvf/adapt-web-ui/issues{/number}","pulls_url":"https://api.github.com/repos/johnvf/adapt-web-ui/pulls{/number}","milestones_url":"https://api.github.com/repos/johnvf/adapt-web-ui/milestones{/number}","notifications_url":"https://api.github.com/repos/johnvf/adapt-web-ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/johnvf/adapt-web-ui/labels{/name}","releases_url":"https://api.github.com/repos/johnvf/adapt-web-ui/releases{/id}","created_at":"2015-11-14T22:29:51Z","updated_at":"2015-11-23T23:43:49Z","pushed_at":"2015-12-08T20:25:35Z","git_url":"git://github.com/johnvf/adapt-web-ui.git","ssh_url":"git@github.com:johnvf/adapt-web-ui.git","clone_url":"https://github.com/johnvf/adapt-web-ui.git","svn_url":"https://github.com/johnvf/adapt-web-ui","homepage":null,"size":755,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":6,"forks":0,"open_issues":6,"watchers":1,"default_branch":"master"}},"base":{"label":"johnvf:master","ref":"master","sha":"3a67ddb8590f4942b56cee2a6eaf65f485d9b451","user":{"login":"johnvf","id":6565310,"avatar_url":"https://avatars.githubusercontent.com/u/6565310?v=3","gravatar_id":"","url":"https://api.github.com/users/johnvf","html_url":"https://github.com/johnvf","followers_url":"https://api.github.com/users/johnvf/followers","following_url":"https://api.github.com/users/johnvf/following{/other_user}","gists_url":"https://api.github.com/users/johnvf/gists{/gist_id}","starred_url":"https://api.github.com/users/johnvf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnvf/subscriptions","organizations_url":"https://api.github.com/users/johnvf/orgs","repos_url":"https://api.github.com/users/johnvf/repos","events_url":"https://api.github.com/users/johnvf/events{/privacy}","received_events_url":"https://api.github.com/users/johnvf/received_events","type":"User","site_admin":false},"repo":{"id":46194632,"name":"adapt-web-ui","full_name":"johnvf/adapt-web-ui","owner":{"login":"johnvf","id":6565310,"avatar_url":"https://avatars.githubusercontent.com/u/6565310?v=3","gravatar_id":"","url":"https://api.github.com/users/johnvf","html_url":"https://github.com/johnvf","followers_url":"https://api.github.com/users/johnvf/followers","following_url":"https://api.github.com/users/johnvf/following{/other_user}","gists_url":"https://api.github.com/users/johnvf/gists{/gist_id}","starred_url":"https://api.github.com/users/johnvf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnvf/subscriptions","organizations_url":"https://api.github.com/users/johnvf/orgs","repos_url":"https://api.github.com/users/johnvf/repos","events_url":"https://api.github.com/users/johnvf/events{/privacy}","received_events_url":"https://api.github.com/users/johnvf/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/johnvf/adapt-web-ui","description":"Web UI for Adapt","fork":false,"url":"https://api.github.com/repos/johnvf/adapt-web-ui","forks_url":"https://api.github.com/repos/johnvf/adapt-web-ui/forks","keys_url":"https://api.github.com/repos/johnvf/adapt-web-ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/johnvf/adapt-web-ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/johnvf/adapt-web-ui/teams","hooks_url":"https://api.github.com/repos/johnvf/adapt-web-ui/hooks","issue_events_url":"https://api.github.com/repos/johnvf/adapt-web-ui/issues/events{/number}","events_url":"https://api.github.com/repos/johnvf/adapt-web-ui/events","assignees_url":"https://api.github.com/repos/johnvf/adapt-web-ui/assignees{/user}","branches_url":"https://api.github.com/repos/johnvf/adapt-web-ui/branches{/branch}","tags_url":"https://api.github.com/repos/johnvf/adapt-web-ui/tags","blobs_url":"https://api.github.com/repos/johnvf/adapt-web-ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/johnvf/adapt-web-ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/johnvf/adapt-web-ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/johnvf/adapt-web-ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/johnvf/adapt-web-ui/statuses/{sha}","languages_url":"https://api.github.com/repos/johnvf/adapt-web-ui/languages","stargazers_url":"https://api.github.com/repos/johnvf/adapt-web-ui/stargazers","contributors_url":"https://api.github.com/repos/johnvf/adapt-web-ui/contributors","subscribers_url":"https://api.github.com/repos/johnvf/adapt-web-ui/subscribers","subscription_url":"https://api.github.com/repos/johnvf/adapt-web-ui/subscription","commits_url":"https://api.github.com/repos/johnvf/adapt-web-ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/johnvf/adapt-web-ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/johnvf/adapt-web-ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/johnvf/adapt-web-ui/issues/comments{/number}","contents_url":"https://api.github.com/repos/johnvf/adapt-web-ui/contents/{+path}","compare_url":"https://api.github.com/repos/johnvf/adapt-web-ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/johnvf/adapt-web-ui/merges","archive_url":"https://api.github.com/repos/johnvf/adapt-web-ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/johnvf/adapt-web-ui/downloads","issues_url":"https://api.github.com/repos/johnvf/adapt-web-ui/issues{/number}","pulls_url":"https://api.github.com/repos/johnvf/adapt-web-ui/pulls{/number}","milestones_url":"https://api.github.com/repos/johnvf/adapt-web-ui/milestones{/number}","notifications_url":"https://api.github.com/repos/johnvf/adapt-web-ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/johnvf/adapt-web-ui/labels{/name}","releases_url":"https://api.github.com/repos/johnvf/adapt-web-ui/releases{/id}","created_at":"2015-11-14T22:29:51Z","updated_at":"2015-11-23T23:43:49Z","pushed_at":"2015-12-08T20:25:35Z","git_url":"git://github.com/johnvf/adapt-web-ui.git","ssh_url":"git@github.com:johnvf/adapt-web-ui.git","clone_url":"https://github.com/johnvf/adapt-web-ui.git","svn_url":"https://github.com/johnvf/adapt-web-ui","homepage":null,"size":755,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":6,"forks":0,"open_issues":6,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/johnvf/adapt-web-ui/pulls/9"},"html":{"href":"https://github.com/johnvf/adapt-web-ui/pull/9"},"issue":{"href":"https://api.github.com/repos/johnvf/adapt-web-ui/issues/9"},"comments":{"href":"https://api.github.com/repos/johnvf/adapt-web-ui/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/johnvf/adapt-web-ui/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/johnvf/adapt-web-ui/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/johnvf/adapt-web-ui/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/johnvf/adapt-web-ui/statuses/768a0b19bbc2bbfe4adfb8d6674b2d8ed202a98d"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":2,"additions":218,"deletions":9,"changed_files":7}}