{"action":"created","comment":{"url":"https://api.github.com/repos/plotly/plotly.js/pulls/comments/53197690","id":53197690,"diff_hunk":"@@ -178,6 +173,32 @@ function areAllAxesFixed(fullLayout) {\n     return allFixed;\n }\n \n+// look for traces that support selection\n+// to be updated as we add more selectPoints handlers\n+function isSelectable(fullData) {\n+    var selectable = false;\n+\n+    for(var i = 0; i < fullData.length; i++) {\n+        if(selectable) break;\n+\n+        var trace = fullData[i];\n+\n+        if(!trace._module || !trace._module.selectPoints) continue;","path":"src/components/modebar/manage.js","position":149,"original_position":149,"commit_id":"05a1b4fb51a9adb663c4c0bfdd500f82d201a7ee","original_commit_id":"05a1b4fb51a9adb663c4c0bfdd500f82d201a7ee","user":{"login":"mdtusz","id":6494463,"avatar_url":"https://avatars.githubusercontent.com/u/6494463?v=3","gravatar_id":"","url":"https://api.github.com/users/mdtusz","html_url":"https://github.com/mdtusz","followers_url":"https://api.github.com/users/mdtusz/followers","following_url":"https://api.github.com/users/mdtusz/following{/other_user}","gists_url":"https://api.github.com/users/mdtusz/gists{/gist_id}","starred_url":"https://api.github.com/users/mdtusz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdtusz/subscriptions","organizations_url":"https://api.github.com/users/mdtusz/orgs","repos_url":"https://api.github.com/users/mdtusz/repos","events_url":"https://api.github.com/users/mdtusz/events{/privacy}","received_events_url":"https://api.github.com/users/mdtusz/received_events","type":"User","site_admin":false},"body":"If we get past this point, all the code below has no purpose - `selectable` will always be set to true and `true` will be returned. \r\n\r\nCan we simplify this:\r\n\r\n``` js\r\nfunction isSelectable(fullData) {\r\n    var selectable = false;\r\n\r\n    for(var i = 0; i < fullData.length; i++) {\r\n        var trace = fullData[i];\r\n        if(!trace._module || !trace._module.selectPoints) continue\r\n        else return true;\r\n    }\r\n}\r\n```\r\n\r\nAs far as I can see this will do the same thing. ","created_at":"2016-02-17T17:15:52Z","updated_at":"2016-02-17T17:15:52Z","html_url":"https://github.com/plotly/plotly.js/pull/258#discussion_r53197690","pull_request_url":"https://api.github.com/repos/plotly/plotly.js/pulls/258","_links":{"self":{"href":"https://api.github.com/repos/plotly/plotly.js/pulls/comments/53197690"},"html":{"href":"https://github.com/plotly/plotly.js/pull/258#discussion_r53197690"},"pull_request":{"href":"https://api.github.com/repos/plotly/plotly.js/pulls/258"}}},"pull_request":{"url":"https://api.github.com/repos/plotly/plotly.js/pulls/258","id":59571017,"html_url":"https://github.com/plotly/plotly.js/pull/258","diff_url":"https://github.com/plotly/plotly.js/pull/258.diff","patch_url":"https://github.com/plotly/plotly.js/pull/258.patch","issue_url":"https://api.github.com/repos/plotly/plotly.js/issues/258","number":258,"state":"open","locked":false,"title":"Subplot mode bars","user":{"login":"etpinard","id":6675409,"avatar_url":"https://avatars.githubusercontent.com/u/6675409?v=3","gravatar_id":"","url":"https://api.github.com/users/etpinard","html_url":"https://github.com/etpinard","followers_url":"https://api.github.com/users/etpinard/followers","following_url":"https://api.github.com/users/etpinard/following{/other_user}","gists_url":"https://api.github.com/users/etpinard/gists{/gist_id}","starred_url":"https://api.github.com/users/etpinard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/etpinard/subscriptions","organizations_url":"https://api.github.com/users/etpinard/orgs","repos_url":"https://api.github.com/users/etpinard/repos","events_url":"https://api.github.com/users/etpinard/events{/privacy}","received_events_url":"https://api.github.com/users/etpinard/received_events","type":"User","site_admin":false},"body":"@mdtusz \r\n\r\nA follow-up of https://github.com/plotly/plotly.js/pull/246\r\n\r\nThis PR ended up being pretty big as I kept discovering bugs in some very uncharted waters of the plotly.js subplot sea :ocean: \r\n\r\n### Main additions\r\n- Mode bar of multi-subplot-type graphs don't look hideous any more. This PR adds multi-plot-type mode bar buttons that can reset the view and toggle hover label visibility of all subplots at once.\r\n- `layout.hovermode` and `layout.dragmode` are now also attributes of each gl3d scene. This was needed so that cartesian and gl3d hovermodes and dragmodes don't conflict with one another. In gl3d-only graphs `scene.hovermode` and `scene.dragmode` *inherit* from `layout.hovermode` and `layout.dragmode` respectively, keeping backward compatibility. \r\n- Mode bar button click handlers are now tested.\r\n\r\n### Undiscovered bug fixes\r\n- Gl3d scenes used to **not** hide hover labels when hovermode was set to `false` (I can't believe we never caught that)\r\n- Gl3d scenes used to set their camera position using the `camera` attribute of the first scene **always**..\r\n- The GL3d toggle hover mode button used to reset the scene domains after two clicks.\r\n- Resetting the camera position to last save when the supplied `camera` attribute wasn't filled with all `eye`, `center` and `up` objects did not work (resulted in a js error)","created_at":"2016-02-16T23:15:36Z","updated_at":"2016-02-17T17:15:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"03ce5c9a19c2abac0a5b9d7e97c3c8e8c8b508e7","assignee":null,"milestone":{"url":"https://api.github.com/repos/plotly/plotly.js/milestones/4","html_url":"https://github.com/plotly/plotly.js/milestones/subplotly.js","labels_url":"https://api.github.com/repos/plotly/plotly.js/milestones/4/labels","id":1555893,"number":4,"title":"subplotly.js","description":"Make different plot types (e.g. cartesain, gl3d, geo, gl2d, polar) play better together.","creator":{"login":"etpinard","id":6675409,"avatar_url":"https://avatars.githubusercontent.com/u/6675409?v=3","gravatar_id":"","url":"https://api.github.com/users/etpinard","html_url":"https://github.com/etpinard","followers_url":"https://api.github.com/users/etpinard/followers","following_url":"https://api.github.com/users/etpinard/following{/other_user}","gists_url":"https://api.github.com/users/etpinard/gists{/gist_id}","starred_url":"https://api.github.com/users/etpinard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/etpinard/subscriptions","organizations_url":"https://api.github.com/users/etpinard/orgs","repos_url":"https://api.github.com/users/etpinard/repos","events_url":"https://api.github.com/users/etpinard/events{/privacy}","received_events_url":"https://api.github.com/users/etpinard/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":2,"state":"open","created_at":"2016-02-01T15:26:43Z","updated_at":"2016-02-16T23:15:36Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/plotly/plotly.js/pulls/258/commits","review_comments_url":"https://api.github.com/repos/plotly/plotly.js/pulls/258/comments","review_comment_url":"https://api.github.com/repos/plotly/plotly.js/pulls/comments{/number}","comments_url":"https://api.github.com/repos/plotly/plotly.js/issues/258/comments","statuses_url":"https://api.github.com/repos/plotly/plotly.js/statuses/05a1b4fb51a9adb663c4c0bfdd500f82d201a7ee","head":{"label":"plotly:subplot-modebar","ref":"subplot-modebar","sha":"05a1b4fb51a9adb663c4c0bfdd500f82d201a7ee","user":{"login":"plotly","id":5997976,"avatar_url":"https://avatars.githubusercontent.com/u/5997976?v=3","gravatar_id":"","url":"https://api.github.com/users/plotly","html_url":"https://github.com/plotly","followers_url":"https://api.github.com/users/plotly/followers","following_url":"https://api.github.com/users/plotly/following{/other_user}","gists_url":"https://api.github.com/users/plotly/gists{/gist_id}","starred_url":"https://api.github.com/users/plotly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plotly/subscriptions","organizations_url":"https://api.github.com/users/plotly/orgs","repos_url":"https://api.github.com/users/plotly/repos","events_url":"https://api.github.com/users/plotly/events{/privacy}","received_events_url":"https://api.github.com/users/plotly/received_events","type":"Organization","site_admin":false},"repo":{"id":45646037,"name":"plotly.js","full_name":"plotly/plotly.js","owner":{"login":"plotly","id":5997976,"avatar_url":"https://avatars.githubusercontent.com/u/5997976?v=3","gravatar_id":"","url":"https://api.github.com/users/plotly","html_url":"https://github.com/plotly","followers_url":"https://api.github.com/users/plotly/followers","following_url":"https://api.github.com/users/plotly/following{/other_user}","gists_url":"https://api.github.com/users/plotly/gists{/gist_id}","starred_url":"https://api.github.com/users/plotly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plotly/subscriptions","organizations_url":"https://api.github.com/users/plotly/orgs","repos_url":"https://api.github.com/users/plotly/repos","events_url":"https://api.github.com/users/plotly/events{/privacy}","received_events_url":"https://api.github.com/users/plotly/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/plotly/plotly.js","description":"The open source javascript graphing library that powers plotly","fork":false,"url":"https://api.github.com/repos/plotly/plotly.js","forks_url":"https://api.github.com/repos/plotly/plotly.js/forks","keys_url":"https://api.github.com/repos/plotly/plotly.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/plotly/plotly.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/plotly/plotly.js/teams","hooks_url":"https://api.github.com/repos/plotly/plotly.js/hooks","issue_events_url":"https://api.github.com/repos/plotly/plotly.js/issues/events{/number}","events_url":"https://api.github.com/repos/plotly/plotly.js/events","assignees_url":"https://api.github.com/repos/plotly/plotly.js/assignees{/user}","branches_url":"https://api.github.com/repos/plotly/plotly.js/branches{/branch}","tags_url":"https://api.github.com/repos/plotly/plotly.js/tags","blobs_url":"https://api.github.com/repos/plotly/plotly.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/plotly/plotly.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/plotly/plotly.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/plotly/plotly.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/plotly/plotly.js/statuses/{sha}","languages_url":"https://api.github.com/repos/plotly/plotly.js/languages","stargazers_url":"https://api.github.com/repos/plotly/plotly.js/stargazers","contributors_url":"https://api.github.com/repos/plotly/plotly.js/contributors","subscribers_url":"https://api.github.com/repos/plotly/plotly.js/subscribers","subscription_url":"https://api.github.com/repos/plotly/plotly.js/subscription","commits_url":"https://api.github.com/repos/plotly/plotly.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/plotly/plotly.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/plotly/plotly.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/plotly/plotly.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/plotly/plotly.js/contents/{+path}","compare_url":"https://api.github.com/repos/plotly/plotly.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/plotly/plotly.js/merges","archive_url":"https://api.github.com/repos/plotly/plotly.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/plotly/plotly.js/downloads","issues_url":"https://api.github.com/repos/plotly/plotly.js/issues{/number}","pulls_url":"https://api.github.com/repos/plotly/plotly.js/pulls{/number}","milestones_url":"https://api.github.com/repos/plotly/plotly.js/milestones{/number}","notifications_url":"https://api.github.com/repos/plotly/plotly.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/plotly/plotly.js/labels{/name}","releases_url":"https://api.github.com/repos/plotly/plotly.js/releases{/id}","deployments_url":"https://api.github.com/repos/plotly/plotly.js/deployments","created_at":"2015-11-05T23:27:17Z","updated_at":"2016-02-17T14:28:10Z","pushed_at":"2016-02-16T23:15:36Z","git_url":"git://github.com/plotly/plotly.js.git","ssh_url":"git@github.com:plotly/plotly.js.git","clone_url":"https://github.com/plotly/plotly.js.git","svn_url":"https://github.com/plotly/plotly.js","homepage":"https://plot.ly/javascript/","size":101335,"stargazers_count":4173,"watchers_count":4173,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":282,"mirror_url":null,"open_issues_count":84,"forks":282,"open_issues":84,"watchers":4173,"default_branch":"master"}},"base":{"label":"plotly:master","ref":"master","sha":"4221a2ab01555ff34b7af0766646d498413baf62","user":{"login":"plotly","id":5997976,"avatar_url":"https://avatars.githubusercontent.com/u/5997976?v=3","gravatar_id":"","url":"https://api.github.com/users/plotly","html_url":"https://github.com/plotly","followers_url":"https://api.github.com/users/plotly/followers","following_url":"https://api.github.com/users/plotly/following{/other_user}","gists_url":"https://api.github.com/users/plotly/gists{/gist_id}","starred_url":"https://api.github.com/users/plotly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plotly/subscriptions","organizations_url":"https://api.github.com/users/plotly/orgs","repos_url":"https://api.github.com/users/plotly/repos","events_url":"https://api.github.com/users/plotly/events{/privacy}","received_events_url":"https://api.github.com/users/plotly/received_events","type":"Organization","site_admin":false},"repo":{"id":45646037,"name":"plotly.js","full_name":"plotly/plotly.js","owner":{"login":"plotly","id":5997976,"avatar_url":"https://avatars.githubusercontent.com/u/5997976?v=3","gravatar_id":"","url":"https://api.github.com/users/plotly","html_url":"https://github.com/plotly","followers_url":"https://api.github.com/users/plotly/followers","following_url":"https://api.github.com/users/plotly/following{/other_user}","gists_url":"https://api.github.com/users/plotly/gists{/gist_id}","starred_url":"https://api.github.com/users/plotly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plotly/subscriptions","organizations_url":"https://api.github.com/users/plotly/orgs","repos_url":"https://api.github.com/users/plotly/repos","events_url":"https://api.github.com/users/plotly/events{/privacy}","received_events_url":"https://api.github.com/users/plotly/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/plotly/plotly.js","description":"The open source javascript graphing library that powers plotly","fork":false,"url":"https://api.github.com/repos/plotly/plotly.js","forks_url":"https://api.github.com/repos/plotly/plotly.js/forks","keys_url":"https://api.github.com/repos/plotly/plotly.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/plotly/plotly.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/plotly/plotly.js/teams","hooks_url":"https://api.github.com/repos/plotly/plotly.js/hooks","issue_events_url":"https://api.github.com/repos/plotly/plotly.js/issues/events{/number}","events_url":"https://api.github.com/repos/plotly/plotly.js/events","assignees_url":"https://api.github.com/repos/plotly/plotly.js/assignees{/user}","branches_url":"https://api.github.com/repos/plotly/plotly.js/branches{/branch}","tags_url":"https://api.github.com/repos/plotly/plotly.js/tags","blobs_url":"https://api.github.com/repos/plotly/plotly.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/plotly/plotly.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/plotly/plotly.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/plotly/plotly.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/plotly/plotly.js/statuses/{sha}","languages_url":"https://api.github.com/repos/plotly/plotly.js/languages","stargazers_url":"https://api.github.com/repos/plotly/plotly.js/stargazers","contributors_url":"https://api.github.com/repos/plotly/plotly.js/contributors","subscribers_url":"https://api.github.com/repos/plotly/plotly.js/subscribers","subscription_url":"https://api.github.com/repos/plotly/plotly.js/subscription","commits_url":"https://api.github.com/repos/plotly/plotly.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/plotly/plotly.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/plotly/plotly.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/plotly/plotly.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/plotly/plotly.js/contents/{+path}","compare_url":"https://api.github.com/repos/plotly/plotly.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/plotly/plotly.js/merges","archive_url":"https://api.github.com/repos/plotly/plotly.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/plotly/plotly.js/downloads","issues_url":"https://api.github.com/repos/plotly/plotly.js/issues{/number}","pulls_url":"https://api.github.com/repos/plotly/plotly.js/pulls{/number}","milestones_url":"https://api.github.com/repos/plotly/plotly.js/milestones{/number}","notifications_url":"https://api.github.com/repos/plotly/plotly.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/plotly/plotly.js/labels{/name}","releases_url":"https://api.github.com/repos/plotly/plotly.js/releases{/id}","deployments_url":"https://api.github.com/repos/plotly/plotly.js/deployments","created_at":"2015-11-05T23:27:17Z","updated_at":"2016-02-17T14:28:10Z","pushed_at":"2016-02-16T23:15:36Z","git_url":"git://github.com/plotly/plotly.js.git","ssh_url":"git@github.com:plotly/plotly.js.git","clone_url":"https://github.com/plotly/plotly.js.git","svn_url":"https://github.com/plotly/plotly.js","homepage":"https://plot.ly/javascript/","size":101335,"stargazers_count":4173,"watchers_count":4173,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":282,"mirror_url":null,"open_issues_count":84,"forks":282,"open_issues":84,"watchers":4173,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/plotly/plotly.js/pulls/258"},"html":{"href":"https://github.com/plotly/plotly.js/pull/258"},"issue":{"href":"https://api.github.com/repos/plotly/plotly.js/issues/258"},"comments":{"href":"https://api.github.com/repos/plotly/plotly.js/issues/258/comments"},"review_comments":{"href":"https://api.github.com/repos/plotly/plotly.js/pulls/258/comments"},"review_comment":{"href":"https://api.github.com/repos/plotly/plotly.js/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/plotly/plotly.js/pulls/258/commits"},"statuses":{"href":"https://api.github.com/repos/plotly/plotly.js/statuses/05a1b4fb51a9adb663c4c0bfdd500f82d201a7ee"}}}}