GitHub PullRequestReviewCommentEvent at 2014-06-03 20:16:20
Repository: plottable
Actor: danmane
Payload: {"comment":{"url":"https://api.github.com/repos/palantir/plottable/pulls/comments/13356551","id":13356551,"diff_hunk":"@@ -0,0 +1,71 @@\n+///<reference path=\"../reference.ts\" />\n+\n+module Plottable {\n+  export class ToggleLegend extends Legend {\n+    private callback: (datum: any, newState: boolean) => any;\n+\n+    // this is the set of all elements that are currently toggled off\n+    private isOff: D3.Set;\n+\n+    /**\n+     * Creates a ToggleLegend.\n+     *\n+     * @constructor\n+     * @param {ColorScale} colorScale\n+     * @param {(datum: any, newState: boolean) => any} callback The function to be called when a legend entry is clicked.\n+     */\n+    constructor(colorScale: ColorScale, callback: (datum: any, newState: boolean) => any) {\n+      this.callback = callback;\n+      // initially, everything is toggled on","path":"src/components/toggleLegend.ts","position":19,"original_position":19,"commit_id":"6e7e8ee8db9969fe5ba7ba78612bbe81e463b97b","original_commit_id":"6e7e8ee8db9969fe5ba7ba78612bbe81e463b97b","user":{"login":"danmane","id":1400023,"avatar_url":"https://avatars.githubusercontent.com/u/1400023?","gravatar_id":"93eed4546a135f28b655858bee6b74c0","url":"https://api.github.com/users/danmane","html_url":"https://github.com/danmane","followers_url":"https://api.github.com/users/danmane/followers","following_url":"https://api.github.com/users/danmane/following{/other_user}","gists_url":"https://api.github.com/users/danmane/gists{/gist_id}","starred_url":"https://api.github.com/users/danmane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danmane/subscriptions","organizations_url":"https://api.github.com/users/danmane/orgs","repos_url":"https://api.github.com/users/danmane/repos","events_url":"https://api.github.com/users/danmane/events{/privacy}","received_events_url":"https://api.github.com/users/danmane/received_events","type":"User","site_admin":false},"body":"could you put the comment on the same line as `this.isOff = d3.set([])`? this ensures that they can never get accidentally seperated in a refactor. also, `d3.set()` is the same as `d3.set([])` and a bit easier to read imo","created_at":"2014-06-03T20:16:20Z","updated_at":"2014-06-03T20:16:20Z","html_url":"https://github.com/palantir/plottable/pull/479#discussion_r13356551","pull_request_url":"https://api.github.com/repos/palantir/plottable/pulls/479","_links":{"self":{"href":"https://api.github.com/repos/palantir/plottable/pulls/comments/13356551"},"html":{"href":"https://github.com/palantir/plottable/pull/479#discussion_r13356551"},"pull_request":{"href":"https://api.github.com/repos/palantir/plottable/pulls/479"}}}}