{"action":"created","comment":{"url":"https://api.github.com/repos/Caltech-IPAC/firefly/pulls/comments/57845158","id":57845158,"diff_hunk":"@@ -0,0 +1,182 @@\n+/*\n+ * License information at https://github.com/Caltech-IPAC/firefly/blob/master/License.txt\n+ */\n+\n+\n+import {isEmpty} from 'lodash';\n+import {primePlot} from '../visualize/PlotViewUtil.js';\n+import {visRoot} from '../visualize/ImagePlotCntlr.js';\n+import PointDataObj, {DrawSymbol} from '../visualize/draw/PointDataObj.js';\n+import {makeDrawingDef, COLOR_PT_1, COLOR_PT_2, \n+    COLOR_PT_3, COLOR_PT_5, COLOR_PT_6} from '../visualize/draw/DrawingDef.js';\n+import DrawLayer, {DataTypes,ColorChangeType} from '../visualize/draw/DrawLayer.js';\n+import {makeFactoryDef} from '../visualize/draw/DrawLayerFactory.js';\n+import DrawLayerCntlr from '../visualize/DrawLayerCntlr.js';\n+import {MouseState} from '../visualize/VisMouseCntlr.js';\n+import DrawOp from '../visualize/draw/DrawOp.js';\n+import {makeWorldPt} from '../visualize/Point.js';\n+import {dispatchTableHighlight} from '../tables/TablesCntlr.js';\n+import {COLOR_HIGHLIGHTED_PT} from '../visualize/draw/DrawingDef.js';\n+import {MetaConst} from '../data/MetaConst.js';\n+\n+const TYPE_ID= 'CATALOG_TYPE';\n+\n+const helpText=\n+    `Click on point to highlight`;\n+\n+\n+\n+\n+const factoryDef= makeFactoryDef(TYPE_ID,creator,getDrawData,getLayerChanges,null,null);\n+export default {factoryDef, TYPE_ID}; // every draw layer must default export with factoryDef and TYPE_ID\n+\n+\n+\n+\n+\n+var createCnt= 0;\n+const defColors= [COLOR_PT_1, COLOR_PT_2, COLOR_PT_3, COLOR_PT_5, COLOR_PT_6];\n+\n+\n+function creator(initPayload) {\n+    const {catalogId, tableData, tableMeta, columns, tableRequest, highlightedRow}= initPayload;\n+    var drawingDef= makeDrawingDef();\n+    drawingDef.symbol= DrawSymbol.SQUARE;\n+\n+    var pairs= {\n+        [MouseState.DOWN.key]: highlightChange\n+    };\n+\n+    drawingDef.color= tableMeta[MetaConst.DEFAULT_COLOR] || defColors[createCnt % defColors.length];\n+\n+    var options= {\n+        hasPerPlotData:false,\n+        isPointData:true,\n+        canUserDelete: true,\n+        canUseMouse:true,\n+        canHighlight: true,\n+        canSelect: true,\n+        canFilter: true,\n+        helpLine : helpText,\n+        canUserChangeColor: ColorChangeType.STATIC\n+    };","path":"src/firefly/js/drawingLayers/Catalog.js","position":62,"original_position":62,"commit_id":"be72365efc8e5245f34b13cf0a5fffd967faa41a","original_commit_id":"be72365efc8e5245f34b13cf0a5fffd967faa41a","user":{"login":"ejoliet","id":770124,"avatar_url":"https://avatars.githubusercontent.com/u/770124?v=3","gravatar_id":"","url":"https://api.github.com/users/ejoliet","html_url":"https://github.com/ejoliet","followers_url":"https://api.github.com/users/ejoliet/followers","following_url":"https://api.github.com/users/ejoliet/following{/other_user}","gists_url":"https://api.github.com/users/ejoliet/gists{/gist_id}","starred_url":"https://api.github.com/users/ejoliet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ejoliet/subscriptions","organizations_url":"https://api.github.com/users/ejoliet/orgs","repos_url":"https://api.github.com/users/ejoliet/repos","events_url":"https://api.github.com/users/ejoliet/events{/privacy}","received_events_url":"https://api.github.com/users/ejoliet/received_events","type":"User","site_admin":false},"body":"One improvement we should add here (or to a different ticket) is that the user should be able to change the shape and size of the overlay symbol","created_at":"2016-03-30T07:12:36Z","updated_at":"2016-03-30T07:12:36Z","html_url":"https://github.com/Caltech-IPAC/firefly/pull/44#discussion_r57845158","pull_request_url":"https://api.github.com/repos/Caltech-IPAC/firefly/pulls/44","_links":{"self":{"href":"https://api.github.com/repos/Caltech-IPAC/firefly/pulls/comments/57845158"},"html":{"href":"https://github.com/Caltech-IPAC/firefly/pull/44#discussion_r57845158"},"pull_request":{"href":"https://api.github.com/repos/Caltech-IPAC/firefly/pulls/44"}}},"pull_request":{"url":"https://api.github.com/repos/Caltech-IPAC/firefly/pulls/44","id":64523348,"html_url":"https://github.com/Caltech-IPAC/firefly/pull/44","diff_url":"https://github.com/Caltech-IPAC/firefly/pull/44.diff","patch_url":"https://github.com/Caltech-IPAC/firefly/pull/44.patch","issue_url":"https://api.github.com/repos/Caltech-IPAC/firefly/issues/44","number":44,"state":"closed","locked":false,"title":"DM-4484: Catalogs Overlay","user":{"login":"robyww","id":6730519,"avatar_url":"https://avatars.githubusercontent.com/u/6730519?v=3","gravatar_id":"","url":"https://api.github.com/users/robyww","html_url":"https://github.com/robyww","followers_url":"https://api.github.com/users/robyww/followers","following_url":"https://api.github.com/users/robyww/following{/other_user}","gists_url":"https://api.github.com/users/robyww/gists{/gist_id}","starred_url":"https://api.github.com/users/robyww/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robyww/subscriptions","organizations_url":"https://api.github.com/users/robyww/orgs","repos_url":"https://api.github.com/users/robyww/repos","events_url":"https://api.github.com/users/robyww/events{/privacy}","received_events_url":"https://api.github.com/users/robyww/received_events","type":"User","site_admin":false},"body":"Catalogs Overlay\r\n\r\nAlso the following:\r\n  - Introduction of Sagas\r\n  - fixed TargetPanel bug\r\n  - added forceReinit property to FieldGroup components\r\n  - added z-index for dialogs","created_at":"2016-03-29T19:53:28Z","updated_at":"2016-03-30T07:12:36Z","closed_at":"2016-03-30T00:27:56Z","merged_at":"2016-03-30T00:27:56Z","merge_commit_sha":"39cc92aa80d48af3e009284f642eae8afcef3660","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Caltech-IPAC/firefly/pulls/44/commits","review_comments_url":"https://api.github.com/repos/Caltech-IPAC/firefly/pulls/44/comments","review_comment_url":"https://api.github.com/repos/Caltech-IPAC/firefly/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Caltech-IPAC/firefly/issues/44/comments","statuses_url":"https://api.github.com/repos/Caltech-IPAC/firefly/statuses/be72365efc8e5245f34b13cf0a5fffd967faa41a","head":{"label":"Caltech-IPAC:dm-4484-catalog-drawing","ref":"dm-4484-catalog-drawing","sha":"be72365efc8e5245f34b13cf0a5fffd967faa41a","user":{"login":"Caltech-IPAC","id":9708378,"avatar_url":"https://avatars.githubusercontent.com/u/9708378?v=3","gravatar_id":"","url":"https://api.github.com/users/Caltech-IPAC","html_url":"https://github.com/Caltech-IPAC","followers_url":"https://api.github.com/users/Caltech-IPAC/followers","following_url":"https://api.github.com/users/Caltech-IPAC/following{/other_user}","gists_url":"https://api.github.com/users/Caltech-IPAC/gists{/gist_id}","starred_url":"https://api.github.com/users/Caltech-IPAC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Caltech-IPAC/subscriptions","organizations_url":"https://api.github.com/users/Caltech-IPAC/orgs","repos_url":"https://api.github.com/users/Caltech-IPAC/repos","events_url":"https://api.github.com/users/Caltech-IPAC/events{/privacy}","received_events_url":"https://api.github.com/users/Caltech-IPAC/received_events","type":"Organization","site_admin":false},"repo":{"id":33508214,"name":"firefly","full_name":"Caltech-IPAC/firefly","owner":{"login":"Caltech-IPAC","id":9708378,"avatar_url":"https://avatars.githubusercontent.com/u/9708378?v=3","gravatar_id":"","url":"https://api.github.com/users/Caltech-IPAC","html_url":"https://github.com/Caltech-IPAC","followers_url":"https://api.github.com/users/Caltech-IPAC/followers","following_url":"https://api.github.com/users/Caltech-IPAC/following{/other_user}","gists_url":"https://api.github.com/users/Caltech-IPAC/gists{/gist_id}","starred_url":"https://api.github.com/users/Caltech-IPAC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Caltech-IPAC/subscriptions","organizations_url":"https://api.github.com/users/Caltech-IPAC/orgs","repos_url":"https://api.github.com/users/Caltech-IPAC/repos","events_url":"https://api.github.com/users/Caltech-IPAC/events{/privacy}","received_events_url":"https://api.github.com/users/Caltech-IPAC/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Caltech-IPAC/firefly","description":"","fork":false,"url":"https://api.github.com/repos/Caltech-IPAC/firefly","forks_url":"https://api.github.com/repos/Caltech-IPAC/firefly/forks","keys_url":"https://api.github.com/repos/Caltech-IPAC/firefly/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Caltech-IPAC/firefly/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Caltech-IPAC/firefly/teams","hooks_url":"https://api.github.com/repos/Caltech-IPAC/firefly/hooks","issue_events_url":"https://api.github.com/repos/Caltech-IPAC/firefly/issues/events{/number}","events_url":"https://api.github.com/repos/Caltech-IPAC/firefly/events","assignees_url":"https://api.github.com/repos/Caltech-IPAC/firefly/assignees{/user}","branches_url":"https://api.github.com/repos/Caltech-IPAC/firefly/branches{/branch}","tags_url":"https://api.github.com/repos/Caltech-IPAC/firefly/tags","blobs_url":"https://api.github.com/repos/Caltech-IPAC/firefly/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Caltech-IPAC/firefly/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Caltech-IPAC/firefly/git/refs{/sha}","trees_url":"https://api.github.com/repos/Caltech-IPAC/firefly/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Caltech-IPAC/firefly/statuses/{sha}","languages_url":"https://api.github.com/repos/Caltech-IPAC/firefly/languages","stargazers_url":"https://api.github.com/repos/Caltech-IPAC/firefly/stargazers","contributors_url":"https://api.github.com/repos/Caltech-IPAC/firefly/contributors","subscribers_url":"https://api.github.com/repos/Caltech-IPAC/firefly/subscribers","subscription_url":"https://api.github.com/repos/Caltech-IPAC/firefly/subscription","commits_url":"https://api.github.com/repos/Caltech-IPAC/firefly/commits{/sha}","git_commits_url":"https://api.github.com/repos/Caltech-IPAC/firefly/git/commits{/sha}","comments_url":"https://api.github.com/repos/Caltech-IPAC/firefly/comments{/number}","issue_comment_url":"https://api.github.com/repos/Caltech-IPAC/firefly/issues/comments{/number}","contents_url":"https://api.github.com/repos/Caltech-IPAC/firefly/contents/{+path}","compare_url":"https://api.github.com/repos/Caltech-IPAC/firefly/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Caltech-IPAC/firefly/merges","archive_url":"https://api.github.com/repos/Caltech-IPAC/firefly/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Caltech-IPAC/firefly/downloads","issues_url":"https://api.github.com/repos/Caltech-IPAC/firefly/issues{/number}","pulls_url":"https://api.github.com/repos/Caltech-IPAC/firefly/pulls{/number}","milestones_url":"https://api.github.com/repos/Caltech-IPAC/firefly/milestones{/number}","notifications_url":"https://api.github.com/repos/Caltech-IPAC/firefly/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Caltech-IPAC/firefly/labels{/name}","releases_url":"https://api.github.com/repos/Caltech-IPAC/firefly/releases{/id}","deployments_url":"https://api.github.com/repos/Caltech-IPAC/firefly/deployments","created_at":"2015-04-06T22:03:13Z","updated_at":"2016-03-28T03:19:43Z","pushed_at":"2016-03-30T00:27:59Z","git_url":"git://github.com/Caltech-IPAC/firefly.git","ssh_url":"git@github.com:Caltech-IPAC/firefly.git","clone_url":"https://github.com/Caltech-IPAC/firefly.git","svn_url":"https://github.com/Caltech-IPAC/firefly","homepage":null,"size":138342,"stargazers_count":3,"watchers_count":3,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":3,"default_branch":"dev"}},"base":{"label":"Caltech-IPAC:dev","ref":"dev","sha":"fae8248ae8a9f4a707aea34077f6628d2001690d","user":{"login":"Caltech-IPAC","id":9708378,"avatar_url":"https://avatars.githubusercontent.com/u/9708378?v=3","gravatar_id":"","url":"https://api.github.com/users/Caltech-IPAC","html_url":"https://github.com/Caltech-IPAC","followers_url":"https://api.github.com/users/Caltech-IPAC/followers","following_url":"https://api.github.com/users/Caltech-IPAC/following{/other_user}","gists_url":"https://api.github.com/users/Caltech-IPAC/gists{/gist_id}","starred_url":"https://api.github.com/users/Caltech-IPAC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Caltech-IPAC/subscriptions","organizations_url":"https://api.github.com/users/Caltech-IPAC/orgs","repos_url":"https://api.github.com/users/Caltech-IPAC/repos","events_url":"https://api.github.com/users/Caltech-IPAC/events{/privacy}","received_events_url":"https://api.github.com/users/Caltech-IPAC/received_events","type":"Organization","site_admin":false},"repo":{"id":33508214,"name":"firefly","full_name":"Caltech-IPAC/firefly","owner":{"login":"Caltech-IPAC","id":9708378,"avatar_url":"https://avatars.githubusercontent.com/u/9708378?v=3","gravatar_id":"","url":"https://api.github.com/users/Caltech-IPAC","html_url":"https://github.com/Caltech-IPAC","followers_url":"https://api.github.com/users/Caltech-IPAC/followers","following_url":"https://api.github.com/users/Caltech-IPAC/following{/other_user}","gists_url":"https://api.github.com/users/Caltech-IPAC/gists{/gist_id}","starred_url":"https://api.github.com/users/Caltech-IPAC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Caltech-IPAC/subscriptions","organizations_url":"https://api.github.com/users/Caltech-IPAC/orgs","repos_url":"https://api.github.com/users/Caltech-IPAC/repos","events_url":"https://api.github.com/users/Caltech-IPAC/events{/privacy}","received_events_url":"https://api.github.com/users/Caltech-IPAC/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Caltech-IPAC/firefly","description":"","fork":false,"url":"https://api.github.com/repos/Caltech-IPAC/firefly","forks_url":"https://api.github.com/repos/Caltech-IPAC/firefly/forks","keys_url":"https://api.github.com/repos/Caltech-IPAC/firefly/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Caltech-IPAC/firefly/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Caltech-IPAC/firefly/teams","hooks_url":"https://api.github.com/repos/Caltech-IPAC/firefly/hooks","issue_events_url":"https://api.github.com/repos/Caltech-IPAC/firefly/issues/events{/number}","events_url":"https://api.github.com/repos/Caltech-IPAC/firefly/events","assignees_url":"https://api.github.com/repos/Caltech-IPAC/firefly/assignees{/user}","branches_url":"https://api.github.com/repos/Caltech-IPAC/firefly/branches{/branch}","tags_url":"https://api.github.com/repos/Caltech-IPAC/firefly/tags","blobs_url":"https://api.github.com/repos/Caltech-IPAC/firefly/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Caltech-IPAC/firefly/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Caltech-IPAC/firefly/git/refs{/sha}","trees_url":"https://api.github.com/repos/Caltech-IPAC/firefly/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Caltech-IPAC/firefly/statuses/{sha}","languages_url":"https://api.github.com/repos/Caltech-IPAC/firefly/languages","stargazers_url":"https://api.github.com/repos/Caltech-IPAC/firefly/stargazers","contributors_url":"https://api.github.com/repos/Caltech-IPAC/firefly/contributors","subscribers_url":"https://api.github.com/repos/Caltech-IPAC/firefly/subscribers","subscription_url":"https://api.github.com/repos/Caltech-IPAC/firefly/subscription","commits_url":"https://api.github.com/repos/Caltech-IPAC/firefly/commits{/sha}","git_commits_url":"https://api.github.com/repos/Caltech-IPAC/firefly/git/commits{/sha}","comments_url":"https://api.github.com/repos/Caltech-IPAC/firefly/comments{/number}","issue_comment_url":"https://api.github.com/repos/Caltech-IPAC/firefly/issues/comments{/number}","contents_url":"https://api.github.com/repos/Caltech-IPAC/firefly/contents/{+path}","compare_url":"https://api.github.com/repos/Caltech-IPAC/firefly/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Caltech-IPAC/firefly/merges","archive_url":"https://api.github.com/repos/Caltech-IPAC/firefly/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Caltech-IPAC/firefly/downloads","issues_url":"https://api.github.com/repos/Caltech-IPAC/firefly/issues{/number}","pulls_url":"https://api.github.com/repos/Caltech-IPAC/firefly/pulls{/number}","milestones_url":"https://api.github.com/repos/Caltech-IPAC/firefly/milestones{/number}","notifications_url":"https://api.github.com/repos/Caltech-IPAC/firefly/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Caltech-IPAC/firefly/labels{/name}","releases_url":"https://api.github.com/repos/Caltech-IPAC/firefly/releases{/id}","deployments_url":"https://api.github.com/repos/Caltech-IPAC/firefly/deployments","created_at":"2015-04-06T22:03:13Z","updated_at":"2016-03-28T03:19:43Z","pushed_at":"2016-03-30T00:27:59Z","git_url":"git://github.com/Caltech-IPAC/firefly.git","ssh_url":"git@github.com:Caltech-IPAC/firefly.git","clone_url":"https://github.com/Caltech-IPAC/firefly.git","svn_url":"https://github.com/Caltech-IPAC/firefly","homepage":null,"size":138342,"stargazers_count":3,"watchers_count":3,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":3,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/Caltech-IPAC/firefly/pulls/44"},"html":{"href":"https://github.com/Caltech-IPAC/firefly/pull/44"},"issue":{"href":"https://api.github.com/repos/Caltech-IPAC/firefly/issues/44"},"comments":{"href":"https://api.github.com/repos/Caltech-IPAC/firefly/issues/44/comments"},"review_comments":{"href":"https://api.github.com/repos/Caltech-IPAC/firefly/pulls/44/comments"},"review_comment":{"href":"https://api.github.com/repos/Caltech-IPAC/firefly/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Caltech-IPAC/firefly/pulls/44/commits"},"statuses":{"href":"https://api.github.com/repos/Caltech-IPAC/firefly/statuses/be72365efc8e5245f34b13cf0a5fffd967faa41a"}}}}