{"action":"created","comment":{"url":"https://api.github.com/repos/vega/lyra/pulls/comments/54734498","id":54734498,"diff_hunk":"@@ -24,18 +30,48 @@ function clean(spec, resolve) {\n       delete spec[k];\n     }\n     else if (dl.isObject(p)) {\n-      spec[k] = p.signal && res ? sg.value(p.signal) : clean(spec[k], resolve);\n+      spec[k] = p.signal && cln ? sg.value(p.signal) : _clean(spec[k], clean);\n     }\n   }\n \n   return spec;\n }\n \n-prototype.export = function(resolve) {\n-  return clean(dl.duplicate(this), resolve);\n+/**\n+ * Initializes the Primitive. This is often where properties will be replaced\n+ * with Lyra-specific signals to drive reactive updates.\n+ * @return {Object} The Primitive.\n+ */\n+Primitive.prototype.init = function() {\n+  return this;\n };\n \n-prototype.parent = function(pid) {\n+/**\n+ * Exports the primitive as a complete Vega specification.\n+ * @param  {boolean} [clean=true] - Should Lyra-specific properties be removed\n+ * or resolved (e.g., converting property signal references to actual values).\n+ * @return {Object} A Vega specification.\n+ */\n+Primitive.prototype.export = function(clean) {\n+  return _clean(dl.duplicate(this), clean);\n+};\n+\n+/**\n+ * Exports the primitive as a complete Vega specification with extra definitions\n+ * to power Lyra-specific interaction (e.g., extra manipulator mark definitions).\n+ * @return {Object} A Vega specification.","path":"src/js/model/primitives/Primitive.js","position":69,"original_position":69,"commit_id":"aae8b73a0544cf0e0a3c4dd67af46dde15440eff","original_commit_id":"aae8b73a0544cf0e0a3c4dd67af46dde15440eff","user":{"login":"deathbearbrown","id":607541,"avatar_url":"https://avatars.githubusercontent.com/u/607541?v=3","gravatar_id":"","url":"https://api.github.com/users/deathbearbrown","html_url":"https://github.com/deathbearbrown","followers_url":"https://api.github.com/users/deathbearbrown/followers","following_url":"https://api.github.com/users/deathbearbrown/following{/other_user}","gists_url":"https://api.github.com/users/deathbearbrown/gists{/gist_id}","starred_url":"https://api.github.com/users/deathbearbrown/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deathbearbrown/subscriptions","organizations_url":"https://api.github.com/users/deathbearbrown/orgs","repos_url":"https://api.github.com/users/deathbearbrown/repos","events_url":"https://api.github.com/users/deathbearbrown/events{/privacy}","received_events_url":"https://api.github.com/users/deathbearbrown/received_events","type":"User","site_admin":false},"body":"Return type","created_at":"2016-03-02T15:04:27Z","updated_at":"2016-03-02T15:04:27Z","html_url":"https://github.com/vega/lyra/pull/263#discussion_r54734498","pull_request_url":"https://api.github.com/repos/vega/lyra/pulls/263","_links":{"self":{"href":"https://api.github.com/repos/vega/lyra/pulls/comments/54734498"},"html":{"href":"https://github.com/vega/lyra/pull/263#discussion_r54734498"},"pull_request":{"href":"https://api.github.com/repos/vega/lyra/pulls/263"}}},"pull_request":{"url":"https://api.github.com/repos/vega/lyra/pulls/263","id":61358990,"html_url":"https://github.com/vega/lyra/pull/263","diff_url":"https://github.com/vega/lyra/pull/263.diff","patch_url":"https://github.com/vega/lyra/pull/263.patch","issue_url":"https://api.github.com/repos/vega/lyra/issues/263","number":263,"state":"open","locked":false,"title":"[WIP] JSDocs","user":{"login":"arvind","id":42262,"avatar_url":"https://avatars.githubusercontent.com/u/42262?v=3","gravatar_id":"","url":"https://api.github.com/users/arvind","html_url":"https://github.com/arvind","followers_url":"https://api.github.com/users/arvind/followers","following_url":"https://api.github.com/users/arvind/following{/other_user}","gists_url":"https://api.github.com/users/arvind/gists{/gist_id}","starred_url":"https://api.github.com/users/arvind/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arvind/subscriptions","organizations_url":"https://api.github.com/users/arvind/orgs","repos_url":"https://api.github.com/users/arvind/repos","events_url":"https://api.github.com/users/arvind/events{/privacy}","received_events_url":"https://api.github.com/users/arvind/received_events","type":"User","site_admin":false},"body":"This adds documentation for the majority of the non-JSX source code. There are three pending areas that need to be documented:\r\n\r\n* [ ] `model/signals`\r\n* [ ] `model/rules`\r\n* [ ] `model/primitives/marks/manipulators`\r\n\r\nFor the latter two, I wasn't entirely sure which JSDoc tag I should be using since both of those extend the `Mark` prototype. It's not exactly an `@interface` and using `@memberof` suggests that they're static members, which they're not. \r\n\r\nIt might, of course, be a sign that there's no good JSDoc tag to describe that design pattern. So perhaps they need to be refactored and moved into `Mark` proper? The reason they are where they are now, though, is I felt it better encapsulated functionality (i.e., all `rules` logic together, and all `manipulators` logic together rather than spread across different modules).","created_at":"2016-03-02T06:59:44Z","updated_at":"2016-03-02T15:04:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"14715892ab294531ebf56f14077099c196a1a544","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/vega/lyra/pulls/263/commits","review_comments_url":"https://api.github.com/repos/vega/lyra/pulls/263/comments","review_comment_url":"https://api.github.com/repos/vega/lyra/pulls/comments{/number}","comments_url":"https://api.github.com/repos/vega/lyra/issues/263/comments","statuses_url":"https://api.github.com/repos/vega/lyra/statuses/aae8b73a0544cf0e0a3c4dd67af46dde15440eff","head":{"label":"vega:as/docs","ref":"as/docs","sha":"aae8b73a0544cf0e0a3c4dd67af46dde15440eff","user":{"login":"vega","id":11796929,"avatar_url":"https://avatars.githubusercontent.com/u/11796929?v=3","gravatar_id":"","url":"https://api.github.com/users/vega","html_url":"https://github.com/vega","followers_url":"https://api.github.com/users/vega/followers","following_url":"https://api.github.com/users/vega/following{/other_user}","gists_url":"https://api.github.com/users/vega/gists{/gist_id}","starred_url":"https://api.github.com/users/vega/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vega/subscriptions","organizations_url":"https://api.github.com/users/vega/orgs","repos_url":"https://api.github.com/users/vega/repos","events_url":"https://api.github.com/users/vega/events{/privacy}","received_events_url":"https://api.github.com/users/vega/received_events","type":"Organization","site_admin":false},"repo":{"id":6179334,"name":"lyra","full_name":"vega/lyra","owner":{"login":"vega","id":11796929,"avatar_url":"https://avatars.githubusercontent.com/u/11796929?v=3","gravatar_id":"","url":"https://api.github.com/users/vega","html_url":"https://github.com/vega","followers_url":"https://api.github.com/users/vega/followers","following_url":"https://api.github.com/users/vega/following{/other_user}","gists_url":"https://api.github.com/users/vega/gists{/gist_id}","starred_url":"https://api.github.com/users/vega/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vega/subscriptions","organizations_url":"https://api.github.com/users/vega/orgs","repos_url":"https://api.github.com/users/vega/repos","events_url":"https://api.github.com/users/vega/events{/privacy}","received_events_url":"https://api.github.com/users/vega/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vega/lyra","description":"An interactive, graphical Visualization Design Environment (VDE)","fork":false,"url":"https://api.github.com/repos/vega/lyra","forks_url":"https://api.github.com/repos/vega/lyra/forks","keys_url":"https://api.github.com/repos/vega/lyra/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vega/lyra/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vega/lyra/teams","hooks_url":"https://api.github.com/repos/vega/lyra/hooks","issue_events_url":"https://api.github.com/repos/vega/lyra/issues/events{/number}","events_url":"https://api.github.com/repos/vega/lyra/events","assignees_url":"https://api.github.com/repos/vega/lyra/assignees{/user}","branches_url":"https://api.github.com/repos/vega/lyra/branches{/branch}","tags_url":"https://api.github.com/repos/vega/lyra/tags","blobs_url":"https://api.github.com/repos/vega/lyra/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vega/lyra/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vega/lyra/git/refs{/sha}","trees_url":"https://api.github.com/repos/vega/lyra/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vega/lyra/statuses/{sha}","languages_url":"https://api.github.com/repos/vega/lyra/languages","stargazers_url":"https://api.github.com/repos/vega/lyra/stargazers","contributors_url":"https://api.github.com/repos/vega/lyra/contributors","subscribers_url":"https://api.github.com/repos/vega/lyra/subscribers","subscription_url":"https://api.github.com/repos/vega/lyra/subscription","commits_url":"https://api.github.com/repos/vega/lyra/commits{/sha}","git_commits_url":"https://api.github.com/repos/vega/lyra/git/commits{/sha}","comments_url":"https://api.github.com/repos/vega/lyra/comments{/number}","issue_comment_url":"https://api.github.com/repos/vega/lyra/issues/comments{/number}","contents_url":"https://api.github.com/repos/vega/lyra/contents/{+path}","compare_url":"https://api.github.com/repos/vega/lyra/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vega/lyra/merges","archive_url":"https://api.github.com/repos/vega/lyra/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vega/lyra/downloads","issues_url":"https://api.github.com/repos/vega/lyra/issues{/number}","pulls_url":"https://api.github.com/repos/vega/lyra/pulls{/number}","milestones_url":"https://api.github.com/repos/vega/lyra/milestones{/number}","notifications_url":"https://api.github.com/repos/vega/lyra/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vega/lyra/labels{/name}","releases_url":"https://api.github.com/repos/vega/lyra/releases{/id}","deployments_url":"https://api.github.com/repos/vega/lyra/deployments","created_at":"2012-10-11T19:16:35Z","updated_at":"2016-03-01T15:57:36Z","pushed_at":"2016-03-02T06:59:44Z","git_url":"git://github.com/vega/lyra.git","ssh_url":"git@github.com:vega/lyra.git","clone_url":"https://github.com/vega/lyra.git","svn_url":"https://github.com/vega/lyra","homepage":"http://idl.cs.washington.edu/projects/lyra/","size":7342,"stargazers_count":564,"watchers_count":564,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":97,"mirror_url":null,"open_issues_count":36,"forks":97,"open_issues":36,"watchers":564,"default_branch":"lyra2"}},"base":{"label":"vega:lyra2","ref":"lyra2","sha":"972f76a960fbb653885623183d307ca19d67a59d","user":{"login":"vega","id":11796929,"avatar_url":"https://avatars.githubusercontent.com/u/11796929?v=3","gravatar_id":"","url":"https://api.github.com/users/vega","html_url":"https://github.com/vega","followers_url":"https://api.github.com/users/vega/followers","following_url":"https://api.github.com/users/vega/following{/other_user}","gists_url":"https://api.github.com/users/vega/gists{/gist_id}","starred_url":"https://api.github.com/users/vega/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vega/subscriptions","organizations_url":"https://api.github.com/users/vega/orgs","repos_url":"https://api.github.com/users/vega/repos","events_url":"https://api.github.com/users/vega/events{/privacy}","received_events_url":"https://api.github.com/users/vega/received_events","type":"Organization","site_admin":false},"repo":{"id":6179334,"name":"lyra","full_name":"vega/lyra","owner":{"login":"vega","id":11796929,"avatar_url":"https://avatars.githubusercontent.com/u/11796929?v=3","gravatar_id":"","url":"https://api.github.com/users/vega","html_url":"https://github.com/vega","followers_url":"https://api.github.com/users/vega/followers","following_url":"https://api.github.com/users/vega/following{/other_user}","gists_url":"https://api.github.com/users/vega/gists{/gist_id}","starred_url":"https://api.github.com/users/vega/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vega/subscriptions","organizations_url":"https://api.github.com/users/vega/orgs","repos_url":"https://api.github.com/users/vega/repos","events_url":"https://api.github.com/users/vega/events{/privacy}","received_events_url":"https://api.github.com/users/vega/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vega/lyra","description":"An interactive, graphical Visualization Design Environment (VDE)","fork":false,"url":"https://api.github.com/repos/vega/lyra","forks_url":"https://api.github.com/repos/vega/lyra/forks","keys_url":"https://api.github.com/repos/vega/lyra/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vega/lyra/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vega/lyra/teams","hooks_url":"https://api.github.com/repos/vega/lyra/hooks","issue_events_url":"https://api.github.com/repos/vega/lyra/issues/events{/number}","events_url":"https://api.github.com/repos/vega/lyra/events","assignees_url":"https://api.github.com/repos/vega/lyra/assignees{/user}","branches_url":"https://api.github.com/repos/vega/lyra/branches{/branch}","tags_url":"https://api.github.com/repos/vega/lyra/tags","blobs_url":"https://api.github.com/repos/vega/lyra/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vega/lyra/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vega/lyra/git/refs{/sha}","trees_url":"https://api.github.com/repos/vega/lyra/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vega/lyra/statuses/{sha}","languages_url":"https://api.github.com/repos/vega/lyra/languages","stargazers_url":"https://api.github.com/repos/vega/lyra/stargazers","contributors_url":"https://api.github.com/repos/vega/lyra/contributors","subscribers_url":"https://api.github.com/repos/vega/lyra/subscribers","subscription_url":"https://api.github.com/repos/vega/lyra/subscription","commits_url":"https://api.github.com/repos/vega/lyra/commits{/sha}","git_commits_url":"https://api.github.com/repos/vega/lyra/git/commits{/sha}","comments_url":"https://api.github.com/repos/vega/lyra/comments{/number}","issue_comment_url":"https://api.github.com/repos/vega/lyra/issues/comments{/number}","contents_url":"https://api.github.com/repos/vega/lyra/contents/{+path}","compare_url":"https://api.github.com/repos/vega/lyra/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vega/lyra/merges","archive_url":"https://api.github.com/repos/vega/lyra/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vega/lyra/downloads","issues_url":"https://api.github.com/repos/vega/lyra/issues{/number}","pulls_url":"https://api.github.com/repos/vega/lyra/pulls{/number}","milestones_url":"https://api.github.com/repos/vega/lyra/milestones{/number}","notifications_url":"https://api.github.com/repos/vega/lyra/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vega/lyra/labels{/name}","releases_url":"https://api.github.com/repos/vega/lyra/releases{/id}","deployments_url":"https://api.github.com/repos/vega/lyra/deployments","created_at":"2012-10-11T19:16:35Z","updated_at":"2016-03-01T15:57:36Z","pushed_at":"2016-03-02T06:59:44Z","git_url":"git://github.com/vega/lyra.git","ssh_url":"git@github.com:vega/lyra.git","clone_url":"https://github.com/vega/lyra.git","svn_url":"https://github.com/vega/lyra","homepage":"http://idl.cs.washington.edu/projects/lyra/","size":7342,"stargazers_count":564,"watchers_count":564,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":97,"mirror_url":null,"open_issues_count":36,"forks":97,"open_issues":36,"watchers":564,"default_branch":"lyra2"}},"_links":{"self":{"href":"https://api.github.com/repos/vega/lyra/pulls/263"},"html":{"href":"https://github.com/vega/lyra/pull/263"},"issue":{"href":"https://api.github.com/repos/vega/lyra/issues/263"},"comments":{"href":"https://api.github.com/repos/vega/lyra/issues/263/comments"},"review_comments":{"href":"https://api.github.com/repos/vega/lyra/pulls/263/comments"},"review_comment":{"href":"https://api.github.com/repos/vega/lyra/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/vega/lyra/pulls/263/commits"},"statuses":{"href":"https://api.github.com/repos/vega/lyra/statuses/aae8b73a0544cf0e0a3c4dd67af46dde15440eff"}}}}