{"action":"closed","number":938,"pull_request":{"url":"https://api.github.com/repos/masayuki0812/c3/pulls/938","id":27983608,"html_url":"https://github.com/masayuki0812/c3/pull/938","diff_url":"https://github.com/masayuki0812/c3/pull/938.diff","patch_url":"https://github.com/masayuki0812/c3/pull/938.patch","issue_url":"https://api.github.com/repos/masayuki0812/c3/issues/938","number":938,"state":"closed","locked":false,"title":"Adds c3_chart_internal_fn.isTabVisible to disable transitions on inactive tabs. Fixes #924.","user":{"login":"aendrew","id":185041,"avatar_url":"https://avatars.githubusercontent.com/u/185041?v=3","gravatar_id":"","url":"https://api.github.com/users/aendrew","html_url":"https://github.com/aendrew","followers_url":"https://api.github.com/users/aendrew/followers","following_url":"https://api.github.com/users/aendrew/following{/other_user}","gists_url":"https://api.github.com/users/aendrew/gists{/gist_id}","starred_url":"https://api.github.com/users/aendrew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aendrew/subscriptions","organizations_url":"https://api.github.com/users/aendrew/orgs","repos_url":"https://api.github.com/users/aendrew/repos","events_url":"https://api.github.com/users/aendrew/events{/privacy}","received_events_url":"https://api.github.com/users/aendrew/received_events","type":"User","site_admin":false},"body":"This adds a new function, `c3_chart_internal_fn.isTabVisible`, which uses the [Page Visibility API](https://developer.mozilla.org/en-US/docs/Web/Guide/User_experience/Using_the_Page_Visibility_API) to return whether the page is inactive or not. I've then called it `c3_chart_internal_fn.redraw()` on line 614 of `src/core.js`, which short-circuits the conditional and renders the chart without using `d3.transition` (which uses the `requestAnimationFrame` API, which doesn't work on inactive tabs) if the chart's browser tab is inactive.\r\n\r\nSee #924.","created_at":"2015-01-24T22:37:09Z","updated_at":"2015-01-26T07:45:31Z","closed_at":"2015-01-26T07:45:31Z","merged_at":"2015-01-26T07:45:31Z","merge_commit_sha":"390f54ba3cea3d8ebab30a6ec95265b2588ea8d4","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/masayuki0812/c3/pulls/938/commits","review_comments_url":"https://api.github.com/repos/masayuki0812/c3/pulls/938/comments","review_comment_url":"https://api.github.com/repos/masayuki0812/c3/pulls/comments/{number}","comments_url":"https://api.github.com/repos/masayuki0812/c3/issues/938/comments","statuses_url":"https://api.github.com/repos/masayuki0812/c3/statuses/a4c5b7abda963b2cb96211b6c612c088d0e003d4","head":{"label":"aendrew:fixing_924","ref":"fixing_924","sha":"a4c5b7abda963b2cb96211b6c612c088d0e003d4","user":{"login":"aendrew","id":185041,"avatar_url":"https://avatars.githubusercontent.com/u/185041?v=3","gravatar_id":"","url":"https://api.github.com/users/aendrew","html_url":"https://github.com/aendrew","followers_url":"https://api.github.com/users/aendrew/followers","following_url":"https://api.github.com/users/aendrew/following{/other_user}","gists_url":"https://api.github.com/users/aendrew/gists{/gist_id}","starred_url":"https://api.github.com/users/aendrew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aendrew/subscriptions","organizations_url":"https://api.github.com/users/aendrew/orgs","repos_url":"https://api.github.com/users/aendrew/repos","events_url":"https://api.github.com/users/aendrew/events{/privacy}","received_events_url":"https://api.github.com/users/aendrew/received_events","type":"User","site_admin":false},"repo":{"id":22255680,"name":"c3","full_name":"aendrew/c3","owner":{"login":"aendrew","id":185041,"avatar_url":"https://avatars.githubusercontent.com/u/185041?v=3","gravatar_id":"","url":"https://api.github.com/users/aendrew","html_url":"https://github.com/aendrew","followers_url":"https://api.github.com/users/aendrew/followers","following_url":"https://api.github.com/users/aendrew/following{/other_user}","gists_url":"https://api.github.com/users/aendrew/gists{/gist_id}","starred_url":"https://api.github.com/users/aendrew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aendrew/subscriptions","organizations_url":"https://api.github.com/users/aendrew/orgs","repos_url":"https://api.github.com/users/aendrew/repos","events_url":"https://api.github.com/users/aendrew/events{/privacy}","received_events_url":"https://api.github.com/users/aendrew/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/aendrew/c3","description":"A D3-based reusable chart library","fork":true,"url":"https://api.github.com/repos/aendrew/c3","forks_url":"https://api.github.com/repos/aendrew/c3/forks","keys_url":"https://api.github.com/repos/aendrew/c3/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aendrew/c3/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aendrew/c3/teams","hooks_url":"https://api.github.com/repos/aendrew/c3/hooks","issue_events_url":"https://api.github.com/repos/aendrew/c3/issues/events{/number}","events_url":"https://api.github.com/repos/aendrew/c3/events","assignees_url":"https://api.github.com/repos/aendrew/c3/assignees{/user}","branches_url":"https://api.github.com/repos/aendrew/c3/branches{/branch}","tags_url":"https://api.github.com/repos/aendrew/c3/tags","blobs_url":"https://api.github.com/repos/aendrew/c3/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aendrew/c3/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aendrew/c3/git/refs{/sha}","trees_url":"https://api.github.com/repos/aendrew/c3/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aendrew/c3/statuses/{sha}","languages_url":"https://api.github.com/repos/aendrew/c3/languages","stargazers_url":"https://api.github.com/repos/aendrew/c3/stargazers","contributors_url":"https://api.github.com/repos/aendrew/c3/contributors","subscribers_url":"https://api.github.com/repos/aendrew/c3/subscribers","subscription_url":"https://api.github.com/repos/aendrew/c3/subscription","commits_url":"https://api.github.com/repos/aendrew/c3/commits{/sha}","git_commits_url":"https://api.github.com/repos/aendrew/c3/git/commits{/sha}","comments_url":"https://api.github.com/repos/aendrew/c3/comments{/number}","issue_comment_url":"https://api.github.com/repos/aendrew/c3/issues/comments/{number}","contents_url":"https://api.github.com/repos/aendrew/c3/contents/{+path}","compare_url":"https://api.github.com/repos/aendrew/c3/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aendrew/c3/merges","archive_url":"https://api.github.com/repos/aendrew/c3/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aendrew/c3/downloads","issues_url":"https://api.github.com/repos/aendrew/c3/issues{/number}","pulls_url":"https://api.github.com/repos/aendrew/c3/pulls{/number}","milestones_url":"https://api.github.com/repos/aendrew/c3/milestones{/number}","notifications_url":"https://api.github.com/repos/aendrew/c3/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aendrew/c3/labels{/name}","releases_url":"https://api.github.com/repos/aendrew/c3/releases{/id}","created_at":"2014-07-25T12:15:26Z","updated_at":"2015-01-16T12:23:45Z","pushed_at":"2015-01-24T22:48:41Z","git_url":"git://github.com/aendrew/c3.git","ssh_url":"git@github.com:aendrew/c3.git","clone_url":"https://github.com/aendrew/c3.git","svn_url":"https://github.com/aendrew/c3","homepage":"c3js.org","size":5735,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"masayuki0812:master","ref":"master","sha":"76d2df973f99d8b76d20df9400cd32603f14f473","user":{"login":"masayuki0812","id":1142423,"avatar_url":"https://avatars.githubusercontent.com/u/1142423?v=3","gravatar_id":"","url":"https://api.github.com/users/masayuki0812","html_url":"https://github.com/masayuki0812","followers_url":"https://api.github.com/users/masayuki0812/followers","following_url":"https://api.github.com/users/masayuki0812/following{/other_user}","gists_url":"https://api.github.com/users/masayuki0812/gists{/gist_id}","starred_url":"https://api.github.com/users/masayuki0812/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/masayuki0812/subscriptions","organizations_url":"https://api.github.com/users/masayuki0812/orgs","repos_url":"https://api.github.com/users/masayuki0812/repos","events_url":"https://api.github.com/users/masayuki0812/events{/privacy}","received_events_url":"https://api.github.com/users/masayuki0812/received_events","type":"User","site_admin":false},"repo":{"id":11496279,"name":"c3","full_name":"masayuki0812/c3","owner":{"login":"masayuki0812","id":1142423,"avatar_url":"https://avatars.githubusercontent.com/u/1142423?v=3","gravatar_id":"","url":"https://api.github.com/users/masayuki0812","html_url":"https://github.com/masayuki0812","followers_url":"https://api.github.com/users/masayuki0812/followers","following_url":"https://api.github.com/users/masayuki0812/following{/other_user}","gists_url":"https://api.github.com/users/masayuki0812/gists{/gist_id}","starred_url":"https://api.github.com/users/masayuki0812/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/masayuki0812/subscriptions","organizations_url":"https://api.github.com/users/masayuki0812/orgs","repos_url":"https://api.github.com/users/masayuki0812/repos","events_url":"https://api.github.com/users/masayuki0812/events{/privacy}","received_events_url":"https://api.github.com/users/masayuki0812/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/masayuki0812/c3","description":"A D3-based reusable chart library","fork":false,"url":"https://api.github.com/repos/masayuki0812/c3","forks_url":"https://api.github.com/repos/masayuki0812/c3/forks","keys_url":"https://api.github.com/repos/masayuki0812/c3/keys{/key_id}","collaborators_url":"https://api.github.com/repos/masayuki0812/c3/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/masayuki0812/c3/teams","hooks_url":"https://api.github.com/repos/masayuki0812/c3/hooks","issue_events_url":"https://api.github.com/repos/masayuki0812/c3/issues/events{/number}","events_url":"https://api.github.com/repos/masayuki0812/c3/events","assignees_url":"https://api.github.com/repos/masayuki0812/c3/assignees{/user}","branches_url":"https://api.github.com/repos/masayuki0812/c3/branches{/branch}","tags_url":"https://api.github.com/repos/masayuki0812/c3/tags","blobs_url":"https://api.github.com/repos/masayuki0812/c3/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/masayuki0812/c3/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/masayuki0812/c3/git/refs{/sha}","trees_url":"https://api.github.com/repos/masayuki0812/c3/git/trees{/sha}","statuses_url":"https://api.github.com/repos/masayuki0812/c3/statuses/{sha}","languages_url":"https://api.github.com/repos/masayuki0812/c3/languages","stargazers_url":"https://api.github.com/repos/masayuki0812/c3/stargazers","contributors_url":"https://api.github.com/repos/masayuki0812/c3/contributors","subscribers_url":"https://api.github.com/repos/masayuki0812/c3/subscribers","subscription_url":"https://api.github.com/repos/masayuki0812/c3/subscription","commits_url":"https://api.github.com/repos/masayuki0812/c3/commits{/sha}","git_commits_url":"https://api.github.com/repos/masayuki0812/c3/git/commits{/sha}","comments_url":"https://api.github.com/repos/masayuki0812/c3/comments{/number}","issue_comment_url":"https://api.github.com/repos/masayuki0812/c3/issues/comments/{number}","contents_url":"https://api.github.com/repos/masayuki0812/c3/contents/{+path}","compare_url":"https://api.github.com/repos/masayuki0812/c3/compare/{base}...{head}","merges_url":"https://api.github.com/repos/masayuki0812/c3/merges","archive_url":"https://api.github.com/repos/masayuki0812/c3/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/masayuki0812/c3/downloads","issues_url":"https://api.github.com/repos/masayuki0812/c3/issues{/number}","pulls_url":"https://api.github.com/repos/masayuki0812/c3/pulls{/number}","milestones_url":"https://api.github.com/repos/masayuki0812/c3/milestones{/number}","notifications_url":"https://api.github.com/repos/masayuki0812/c3/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/masayuki0812/c3/labels{/name}","releases_url":"https://api.github.com/repos/masayuki0812/c3/releases{/id}","created_at":"2013-07-18T06:51:40Z","updated_at":"2015-01-25T20:04:25Z","pushed_at":"2015-01-26T07:45:31Z","git_url":"git://github.com/masayuki0812/c3.git","ssh_url":"git@github.com:masayuki0812/c3.git","clone_url":"https://github.com/masayuki0812/c3.git","svn_url":"https://github.com/masayuki0812/c3","homepage":"c3js.org","size":10799,"stargazers_count":3686,"watchers_count":3686,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":371,"mirror_url":null,"open_issues_count":132,"forks":371,"open_issues":132,"watchers":3686,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/masayuki0812/c3/pulls/938"},"html":{"href":"https://github.com/masayuki0812/c3/pull/938"},"issue":{"href":"https://api.github.com/repos/masayuki0812/c3/issues/938"},"comments":{"href":"https://api.github.com/repos/masayuki0812/c3/issues/938/comments"},"review_comments":{"href":"https://api.github.com/repos/masayuki0812/c3/pulls/938/comments"},"review_comment":{"href":"https://api.github.com/repos/masayuki0812/c3/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/masayuki0812/c3/pulls/938/commits"},"statuses":{"href":"https://api.github.com/repos/masayuki0812/c3/statuses/a4c5b7abda963b2cb96211b6c612c088d0e003d4"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"masayuki0812","id":1142423,"avatar_url":"https://avatars.githubusercontent.com/u/1142423?v=3","gravatar_id":"","url":"https://api.github.com/users/masayuki0812","html_url":"https://github.com/masayuki0812","followers_url":"https://api.github.com/users/masayuki0812/followers","following_url":"https://api.github.com/users/masayuki0812/following{/other_user}","gists_url":"https://api.github.com/users/masayuki0812/gists{/gist_id}","starred_url":"https://api.github.com/users/masayuki0812/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/masayuki0812/subscriptions","organizations_url":"https://api.github.com/users/masayuki0812/orgs","repos_url":"https://api.github.com/users/masayuki0812/repos","events_url":"https://api.github.com/users/masayuki0812/events{/privacy}","received_events_url":"https://api.github.com/users/masayuki0812/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"commits":1,"additions":16,"deletions":1,"changed_files":1}}