{"action":"created","comment":{"url":"https://api.github.com/repos/palantir/plottable/pulls/comments/35604284","id":35604284,"diff_hunk":"@@ -2331,6 +2331,51 @@ declare module Plottable {\n             boxVisible(show: boolean): SelectionBoxLayer;\n             fixedWidth(): boolean;\n             fixedHeight(): boolean;\n+            /**\n+             * Gets the x scale for this SelectionBoxLayer.\n+             */\n+            xScale<D extends number | {\n+                valueOf(): number;\n+            }>(): QuantitativeScale<D>;\n+            /**\n+             * Sets the x scale for this SelectionBoxLayer.\n+             *\n+             * @returns {SelectionBoxLayer} The calling SelectionBoxLayer.\n+             */\n+            xScale<D extends number | {\n+                valueOf(): number;\n+            }>(xScale: QuantitativeScale<D>): SelectionBoxLayer;\n+            /**\n+             * Gets the y scale for this SelectionBoxLayer.\n+             */\n+            yScale<D extends number | {\n+                valueOf(): number;\n+            }>(): QuantitativeScale<D>;\n+            /**\n+             * Sets the y scale for this SelectionBoxLayer.\n+             *\n+             * @returns {SelectionBoxLayer} The calling SelectionBoxLayer.\n+             */\n+            yScale<D extends number | {\n+                valueOf(): number;\n+            }>(yScale: QuantitativeScale<D>): SelectionBoxLayer;\n+            /**\n+             * Gets the data values backing the left and right edges of the box.\n+             *\n+             * Returns an undefined array if the edges are not backed by a scale.\n+             */\n+            xExtent(): {\n+                valueOf(): number;","path":"plottable.d.ts","position":38,"original_position":38,"commit_id":"85aa9e1552ef45ed914b2062da30bddca14c610f","original_commit_id":"85aa9e1552ef45ed914b2062da30bddca14c610f","user":{"login":"jtlan","id":1440449,"avatar_url":"https://avatars.githubusercontent.com/u/1440449?v=3","gravatar_id":"","url":"https://api.github.com/users/jtlan","html_url":"https://github.com/jtlan","followers_url":"https://api.github.com/users/jtlan/followers","following_url":"https://api.github.com/users/jtlan/following{/other_user}","gists_url":"https://api.github.com/users/jtlan/gists{/gist_id}","starred_url":"https://api.github.com/users/jtlan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jtlan/subscriptions","organizations_url":"https://api.github.com/users/jtlan/orgs","repos_url":"https://api.github.com/users/jtlan/repos","events_url":"https://api.github.com/users/jtlan/events{/privacy}","received_events_url":"https://api.github.com/users/jtlan/received_events","type":"User","site_admin":false},"body":"Is this going to compile under TS1.4? Right now, I think this will cause a compiler error in Typescript 1.4:\r\n```Typescript\r\nvar xExtent = <number[]> selectionBoxLayer.xExtent();\r\n```\r\nbecause TS1.4 doesn't consider `{ valueOf(): number }` convertible to `number`.","created_at":"2015-07-28T00:36:13Z","updated_at":"2015-07-28T00:36:13Z","html_url":"https://github.com/palantir/plottable/pull/2496#discussion_r35604284","pull_request_url":"https://api.github.com/repos/palantir/plottable/pulls/2496","_links":{"self":{"href":"https://api.github.com/repos/palantir/plottable/pulls/comments/35604284"},"html":{"href":"https://github.com/palantir/plottable/pull/2496#discussion_r35604284"},"pull_request":{"href":"https://api.github.com/repos/palantir/plottable/pulls/2496"}}},"pull_request":{"url":"https://api.github.com/repos/palantir/plottable/pulls/2496","id":40618182,"html_url":"https://github.com/palantir/plottable/pull/2496","diff_url":"https://github.com/palantir/plottable/pull/2496.diff","patch_url":"https://github.com/palantir/plottable/pull/2496.patch","issue_url":"https://api.github.com/repos/palantir/plottable/issues/2496","number":2496,"state":"open","locked":false,"title":"[SelectionBoxLayer] - Allow installation of scales","user":{"login":"bluong","id":1448299,"avatar_url":"https://avatars.githubusercontent.com/u/1448299?v=3","gravatar_id":"","url":"https://api.github.com/users/bluong","html_url":"https://github.com/bluong","followers_url":"https://api.github.com/users/bluong/followers","following_url":"https://api.github.com/users/bluong/following{/other_user}","gists_url":"https://api.github.com/users/bluong/gists{/gist_id}","starred_url":"https://api.github.com/users/bluong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bluong/subscriptions","organizations_url":"https://api.github.com/users/bluong/orgs","repos_url":"https://api.github.com/users/bluong/repos","events_url":"https://api.github.com/users/bluong/events{/privacy}","received_events_url":"https://api.github.com/users/bluong/received_events","type":"User","site_admin":false},"body":"Allowing installation of scales onto the `SelectionBoxLayer` allows for `SelectionBoxLayer`s to be data-backed.  This essentially means that the component can react to changes on the scale, re-rendering to place the box in correct location.\r\n\r\nJSFiddle: http://jsfiddle.net/bluong63/zajmnedm/\r\n\r\nAPI Changes:\r\nNote: Let `numberLike` represent something that is a `number` or could be represented as a `number`.\r\n```typescript\r\n/**\r\n * Gets the x scale for this SelectionBoxLayer.\r\n */\r\nxScale<D extends number | { valueOf(): number; }>(): QuantitativeScale<D>;\r\n/**\r\n * Sets the x scale for this SelectionBoxLayer.\r\n *\r\n * @returns {SelectionBoxLayer} The calling SelectionBoxLayer.\r\n */\r\nxScale<D extends number | { valueOf(): number; >(xScale: QuantitativeScale<D>): SelectionBoxLayer;\r\n/**\r\n * Gets the y scale for this SelectionBoxLayer.\r\n */\r\nyScale<D extends number | { valueOf(): number; }>(): QuantitativeScale<D>;\r\n/**\r\n * Sets the y scale for this SelectionBoxLayer.\r\n *\r\n * @returns {SelectionBoxLayer} The calling SelectionBoxLayer.\r\n*/\r\nyScale<D extends number | { valueOf(): number; }>(yScale: QuantitativeScale<D>): SelectionBoxLayer;\r\n/**\r\n * Gets the data values backing the left and right edges of the box.\r\n *\r\n * Returns an undefined array if the edges are not backed by a scale.\r\n */\r\nxExtent(): { valueOf(): number; }[];\r\n/**\r\n * Gets the data values backing the top and bottom edges of the box.\r\n *\r\n * Returns an undefined array if the edges are not backed by a scale.\r\n */\r\nyExtent(): { valueOf(): number; }[];\r\n```\r\n\r\nCloses #2475 ","created_at":"2015-07-22T22:16:07Z","updated_at":"2015-07-28T00:36:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"924594f641ac1c99a96e69c1ba86e5827dff6ce8","assignee":{"login":"bluong","id":1448299,"avatar_url":"https://avatars.githubusercontent.com/u/1448299?v=3","gravatar_id":"","url":"https://api.github.com/users/bluong","html_url":"https://github.com/bluong","followers_url":"https://api.github.com/users/bluong/followers","following_url":"https://api.github.com/users/bluong/following{/other_user}","gists_url":"https://api.github.com/users/bluong/gists{/gist_id}","starred_url":"https://api.github.com/users/bluong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bluong/subscriptions","organizations_url":"https://api.github.com/users/bluong/orgs","repos_url":"https://api.github.com/users/bluong/repos","events_url":"https://api.github.com/users/bluong/events{/privacy}","received_events_url":"https://api.github.com/users/bluong/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/palantir/plottable/milestones/44","html_url":"https://github.com/palantir/plottable/milestones/v1.5.0","labels_url":"https://api.github.com/repos/palantir/plottable/milestones/44/labels","id":1216400,"number":44,"title":"v1.5.0","description":"","creator":{"login":"christinaforney","id":1559622,"avatar_url":"https://avatars.githubusercontent.com/u/1559622?v=3","gravatar_id":"","url":"https://api.github.com/users/christinaforney","html_url":"https://github.com/christinaforney","followers_url":"https://api.github.com/users/christinaforney/followers","following_url":"https://api.github.com/users/christinaforney/following{/other_user}","gists_url":"https://api.github.com/users/christinaforney/gists{/gist_id}","starred_url":"https://api.github.com/users/christinaforney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/christinaforney/subscriptions","organizations_url":"https://api.github.com/users/christinaforney/orgs","repos_url":"https://api.github.com/users/christinaforney/repos","events_url":"https://api.github.com/users/christinaforney/events{/privacy}","received_events_url":"https://api.github.com/users/christinaforney/received_events","type":"User","site_admin":false},"open_issues":18,"closed_issues":0,"state":"open","created_at":"2015-07-20T17:26:22Z","updated_at":"2015-07-27T14:51:29Z","due_on":"2015-07-31T07:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/palantir/plottable/pulls/2496/commits","review_comments_url":"https://api.github.com/repos/palantir/plottable/pulls/2496/comments","review_comment_url":"https://api.github.com/repos/palantir/plottable/pulls/comments{/number}","comments_url":"https://api.github.com/repos/palantir/plottable/issues/2496/comments","statuses_url":"https://api.github.com/repos/palantir/plottable/statuses/85aa9e1552ef45ed914b2062da30bddca14c610f","head":{"label":"palantir:dataSelectionBoxLayer","ref":"dataSelectionBoxLayer","sha":"85aa9e1552ef45ed914b2062da30bddca14c610f","user":{"login":"palantir","id":303157,"avatar_url":"https://avatars.githubusercontent.com/u/303157?v=3","gravatar_id":"","url":"https://api.github.com/users/palantir","html_url":"https://github.com/palantir","followers_url":"https://api.github.com/users/palantir/followers","following_url":"https://api.github.com/users/palantir/following{/other_user}","gists_url":"https://api.github.com/users/palantir/gists{/gist_id}","starred_url":"https://api.github.com/users/palantir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/palantir/subscriptions","organizations_url":"https://api.github.com/users/palantir/orgs","repos_url":"https://api.github.com/users/palantir/repos","events_url":"https://api.github.com/users/palantir/events{/privacy}","received_events_url":"https://api.github.com/users/palantir/received_events","type":"Organization","site_admin":false},"repo":{"id":16149854,"name":"plottable","full_name":"palantir/plottable","owner":{"login":"palantir","id":303157,"avatar_url":"https://avatars.githubusercontent.com/u/303157?v=3","gravatar_id":"","url":"https://api.github.com/users/palantir","html_url":"https://github.com/palantir","followers_url":"https://api.github.com/users/palantir/followers","following_url":"https://api.github.com/users/palantir/following{/other_user}","gists_url":"https://api.github.com/users/palantir/gists{/gist_id}","starred_url":"https://api.github.com/users/palantir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/palantir/subscriptions","organizations_url":"https://api.github.com/users/palantir/orgs","repos_url":"https://api.github.com/users/palantir/repos","events_url":"https://api.github.com/users/palantir/events{/privacy}","received_events_url":"https://api.github.com/users/palantir/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/palantir/plottable","description":"A library of modular chart components, built on D3","fork":false,"url":"https://api.github.com/repos/palantir/plottable","forks_url":"https://api.github.com/repos/palantir/plottable/forks","keys_url":"https://api.github.com/repos/palantir/plottable/keys{/key_id}","collaborators_url":"https://api.github.com/repos/palantir/plottable/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/palantir/plottable/teams","hooks_url":"https://api.github.com/repos/palantir/plottable/hooks","issue_events_url":"https://api.github.com/repos/palantir/plottable/issues/events{/number}","events_url":"https://api.github.com/repos/palantir/plottable/events","assignees_url":"https://api.github.com/repos/palantir/plottable/assignees{/user}","branches_url":"https://api.github.com/repos/palantir/plottable/branches{/branch}","tags_url":"https://api.github.com/repos/palantir/plottable/tags","blobs_url":"https://api.github.com/repos/palantir/plottable/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/palantir/plottable/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/palantir/plottable/git/refs{/sha}","trees_url":"https://api.github.com/repos/palantir/plottable/git/trees{/sha}","statuses_url":"https://api.github.com/repos/palantir/plottable/statuses/{sha}","languages_url":"https://api.github.com/repos/palantir/plottable/languages","stargazers_url":"https://api.github.com/repos/palantir/plottable/stargazers","contributors_url":"https://api.github.com/repos/palantir/plottable/contributors","subscribers_url":"https://api.github.com/repos/palantir/plottable/subscribers","subscription_url":"https://api.github.com/repos/palantir/plottable/subscription","commits_url":"https://api.github.com/repos/palantir/plottable/commits{/sha}","git_commits_url":"https://api.github.com/repos/palantir/plottable/git/commits{/sha}","comments_url":"https://api.github.com/repos/palantir/plottable/comments{/number}","issue_comment_url":"https://api.github.com/repos/palantir/plottable/issues/comments{/number}","contents_url":"https://api.github.com/repos/palantir/plottable/contents/{+path}","compare_url":"https://api.github.com/repos/palantir/plottable/compare/{base}...{head}","merges_url":"https://api.github.com/repos/palantir/plottable/merges","archive_url":"https://api.github.com/repos/palantir/plottable/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/palantir/plottable/downloads","issues_url":"https://api.github.com/repos/palantir/plottable/issues{/number}","pulls_url":"https://api.github.com/repos/palantir/plottable/pulls{/number}","milestones_url":"https://api.github.com/repos/palantir/plottable/milestones{/number}","notifications_url":"https://api.github.com/repos/palantir/plottable/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/palantir/plottable/labels{/name}","releases_url":"https://api.github.com/repos/palantir/plottable/releases{/id}","created_at":"2014-01-22T19:29:19Z","updated_at":"2015-07-27T05:18:15Z","pushed_at":"2015-07-28T00:22:54Z","git_url":"git://github.com/palantir/plottable.git","ssh_url":"git@github.com:palantir/plottable.git","clone_url":"https://github.com/palantir/plottable.git","svn_url":"https://github.com/palantir/plottable","homepage":"plottablejs.org","size":128272,"stargazers_count":631,"watchers_count":631,"language":"TypeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":59,"mirror_url":null,"open_issues_count":146,"forks":59,"open_issues":146,"watchers":631,"default_branch":"develop"}},"base":{"label":"palantir:develop","ref":"develop","sha":"6075494ea2cb95fd6b8a31f413ef993eac1dd0a7","user":{"login":"palantir","id":303157,"avatar_url":"https://avatars.githubusercontent.com/u/303157?v=3","gravatar_id":"","url":"https://api.github.com/users/palantir","html_url":"https://github.com/palantir","followers_url":"https://api.github.com/users/palantir/followers","following_url":"https://api.github.com/users/palantir/following{/other_user}","gists_url":"https://api.github.com/users/palantir/gists{/gist_id}","starred_url":"https://api.github.com/users/palantir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/palantir/subscriptions","organizations_url":"https://api.github.com/users/palantir/orgs","repos_url":"https://api.github.com/users/palantir/repos","events_url":"https://api.github.com/users/palantir/events{/privacy}","received_events_url":"https://api.github.com/users/palantir/received_events","type":"Organization","site_admin":false},"repo":{"id":16149854,"name":"plottable","full_name":"palantir/plottable","owner":{"login":"palantir","id":303157,"avatar_url":"https://avatars.githubusercontent.com/u/303157?v=3","gravatar_id":"","url":"https://api.github.com/users/palantir","html_url":"https://github.com/palantir","followers_url":"https://api.github.com/users/palantir/followers","following_url":"https://api.github.com/users/palantir/following{/other_user}","gists_url":"https://api.github.com/users/palantir/gists{/gist_id}","starred_url":"https://api.github.com/users/palantir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/palantir/subscriptions","organizations_url":"https://api.github.com/users/palantir/orgs","repos_url":"https://api.github.com/users/palantir/repos","events_url":"https://api.github.com/users/palantir/events{/privacy}","received_events_url":"https://api.github.com/users/palantir/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/palantir/plottable","description":"A library of modular chart components, built on D3","fork":false,"url":"https://api.github.com/repos/palantir/plottable","forks_url":"https://api.github.com/repos/palantir/plottable/forks","keys_url":"https://api.github.com/repos/palantir/plottable/keys{/key_id}","collaborators_url":"https://api.github.com/repos/palantir/plottable/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/palantir/plottable/teams","hooks_url":"https://api.github.com/repos/palantir/plottable/hooks","issue_events_url":"https://api.github.com/repos/palantir/plottable/issues/events{/number}","events_url":"https://api.github.com/repos/palantir/plottable/events","assignees_url":"https://api.github.com/repos/palantir/plottable/assignees{/user}","branches_url":"https://api.github.com/repos/palantir/plottable/branches{/branch}","tags_url":"https://api.github.com/repos/palantir/plottable/tags","blobs_url":"https://api.github.com/repos/palantir/plottable/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/palantir/plottable/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/palantir/plottable/git/refs{/sha}","trees_url":"https://api.github.com/repos/palantir/plottable/git/trees{/sha}","statuses_url":"https://api.github.com/repos/palantir/plottable/statuses/{sha}","languages_url":"https://api.github.com/repos/palantir/plottable/languages","stargazers_url":"https://api.github.com/repos/palantir/plottable/stargazers","contributors_url":"https://api.github.com/repos/palantir/plottable/contributors","subscribers_url":"https://api.github.com/repos/palantir/plottable/subscribers","subscription_url":"https://api.github.com/repos/palantir/plottable/subscription","commits_url":"https://api.github.com/repos/palantir/plottable/commits{/sha}","git_commits_url":"https://api.github.com/repos/palantir/plottable/git/commits{/sha}","comments_url":"https://api.github.com/repos/palantir/plottable/comments{/number}","issue_comment_url":"https://api.github.com/repos/palantir/plottable/issues/comments{/number}","contents_url":"https://api.github.com/repos/palantir/plottable/contents/{+path}","compare_url":"https://api.github.com/repos/palantir/plottable/compare/{base}...{head}","merges_url":"https://api.github.com/repos/palantir/plottable/merges","archive_url":"https://api.github.com/repos/palantir/plottable/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/palantir/plottable/downloads","issues_url":"https://api.github.com/repos/palantir/plottable/issues{/number}","pulls_url":"https://api.github.com/repos/palantir/plottable/pulls{/number}","milestones_url":"https://api.github.com/repos/palantir/plottable/milestones{/number}","notifications_url":"https://api.github.com/repos/palantir/plottable/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/palantir/plottable/labels{/name}","releases_url":"https://api.github.com/repos/palantir/plottable/releases{/id}","created_at":"2014-01-22T19:29:19Z","updated_at":"2015-07-27T05:18:15Z","pushed_at":"2015-07-28T00:22:54Z","git_url":"git://github.com/palantir/plottable.git","ssh_url":"git@github.com:palantir/plottable.git","clone_url":"https://github.com/palantir/plottable.git","svn_url":"https://github.com/palantir/plottable","homepage":"plottablejs.org","size":128272,"stargazers_count":631,"watchers_count":631,"language":"TypeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":59,"mirror_url":null,"open_issues_count":146,"forks":59,"open_issues":146,"watchers":631,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/palantir/plottable/pulls/2496"},"html":{"href":"https://github.com/palantir/plottable/pull/2496"},"issue":{"href":"https://api.github.com/repos/palantir/plottable/issues/2496"},"comments":{"href":"https://api.github.com/repos/palantir/plottable/issues/2496/comments"},"review_comments":{"href":"https://api.github.com/repos/palantir/plottable/pulls/2496/comments"},"review_comment":{"href":"https://api.github.com/repos/palantir/plottable/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/palantir/plottable/pulls/2496/commits"},"statuses":{"href":"https://api.github.com/repos/palantir/plottable/statuses/85aa9e1552ef45ed914b2062da30bddca14c610f"}}}}