{"action":"created","comment":{"url":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/pulls/comments/47050578","id":47050578,"diff_hunk":"@@ -1,159 +1,152 @@\n 'use strict';\n \n require('openseadragon');\n+var ImageResource = require('./ImageResource');\n \n-var CanvasObject = function(config, dispatcher) {\n-  this.fullyOpened = config.fullyOpened || false;\n-  this.visible = config.visible || true; // todo: this is not used yet. Do we need it?\n+var CanvasObject = function(config) {\n+  var self = this;\n   this.clipRegion = config.clipRegion;\n   this.opacity = config.opacity || 1;\n-  this.x = config.x || 0;\n-  this.y = config.y || 0;\n-  this.placeholder = config.placeholder || { type: 'image', url: './example-thumbnail.png' };\n   this.index = config.index;\n \n   this.id = config.canvas['@id'];\n-  this.height = config.canvas.height;\n-  this.width = config.canvas.width;\n-  this.images = config.canvas.images;\n+\n+  this.bounds = {\n+    x : config.x || 0,\n+    y : config.y || 0,\n+    height : config.canvas.height,\n+    width : config.canvas.width\n+  };\n+  this.thumbUrl = config.canvas.thumbnail;\n+\n+  // todo: Move this logic into an ImageResourceFactory.\n+  this._getThumbService = function(width) {","path":"src/canvasObject.js","position":32,"original_position":32,"commit_id":"3948935cc2d726b3e7ad28c2a2d5c886ef95294d","original_commit_id":"faa008d00466843167f1246f42b8598e0558a819","user":{"login":"nein09","id":547883,"avatar_url":"https://avatars.githubusercontent.com/u/547883?v=3","gravatar_id":"","url":"https://api.github.com/users/nein09","html_url":"https://github.com/nein09","followers_url":"https://api.github.com/users/nein09/followers","following_url":"https://api.github.com/users/nein09/following{/other_user}","gists_url":"https://api.github.com/users/nein09/gists{/gist_id}","starred_url":"https://api.github.com/users/nein09/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nein09/subscriptions","organizations_url":"https://api.github.com/users/nein09/orgs","repos_url":"https://api.github.com/users/nein09/repos","events_url":"https://api.github.com/users/nein09/events{/privacy}","received_events_url":"https://api.github.com/users/nein09/received_events","type":"User","site_admin":false},"body":"I'll change the naming of this in the other PR, if that's okay.","created_at":"2015-12-09T04:33:47Z","updated_at":"2015-12-09T04:33:47Z","html_url":"https://github.com/sul-dlss/iiifManifestLayouts/pull/102#discussion_r47050578","pull_request_url":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/pulls/102","_links":{"self":{"href":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/pulls/comments/47050578"},"html":{"href":"https://github.com/sul-dlss/iiifManifestLayouts/pull/102#discussion_r47050578"},"pull_request":{"href":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/pulls/102"}}},"pull_request":{"url":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/pulls/102","id":52289158,"html_url":"https://github.com/sul-dlss/iiifManifestLayouts/pull/102","diff_url":"https://github.com/sul-dlss/iiifManifestLayouts/pull/102.diff","patch_url":"https://github.com/sul-dlss/iiifManifestLayouts/pull/102.patch","issue_url":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/issues/102","number":102,"state":"open","locked":false,"title":"[In progress] Canvas object and ImageResource object","user":{"login":"nein09","id":547883,"avatar_url":"https://avatars.githubusercontent.com/u/547883?v=3","gravatar_id":"","url":"https://api.github.com/users/nein09","html_url":"https://github.com/nein09","followers_url":"https://api.github.com/users/nein09/followers","following_url":"https://api.github.com/users/nein09/following{/other_user}","gists_url":"https://api.github.com/users/nein09/gists{/gist_id}","starred_url":"https://api.github.com/users/nein09/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nein09/subscriptions","organizations_url":"https://api.github.com/users/nein09/orgs","repos_url":"https://api.github.com/users/nein09/repos","events_url":"https://api.github.com/users/nein09/events{/privacy}","received_events_url":"https://api.github.com/users/nein09/received_events","type":"User","site_admin":false},"body":"For https://github.com/sul-dlss/iiifManifestLayouts/issues/40","created_at":"2015-12-01T17:31:34Z","updated_at":"2015-12-09T04:33:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ba565c049358677f864a9c09a2c67220aa67798b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/pulls/102/commits","review_comments_url":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/pulls/102/comments","review_comment_url":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/issues/102/comments","statuses_url":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/statuses/3948935cc2d726b3e7ad28c2a2d5c886ef95294d","head":{"label":"sul-dlss:canvas-object","ref":"canvas-object","sha":"3948935cc2d726b3e7ad28c2a2d5c886ef95294d","user":{"login":"sul-dlss","id":230583,"avatar_url":"https://avatars.githubusercontent.com/u/230583?v=3","gravatar_id":"","url":"https://api.github.com/users/sul-dlss","html_url":"https://github.com/sul-dlss","followers_url":"https://api.github.com/users/sul-dlss/followers","following_url":"https://api.github.com/users/sul-dlss/following{/other_user}","gists_url":"https://api.github.com/users/sul-dlss/gists{/gist_id}","starred_url":"https://api.github.com/users/sul-dlss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sul-dlss/subscriptions","organizations_url":"https://api.github.com/users/sul-dlss/orgs","repos_url":"https://api.github.com/users/sul-dlss/repos","events_url":"https://api.github.com/users/sul-dlss/events{/privacy}","received_events_url":"https://api.github.com/users/sul-dlss/received_events","type":"Organization","site_admin":false},"repo":{"id":39087703,"name":"iiifManifestLayouts","full_name":"sul-dlss/iiifManifestLayouts","owner":{"login":"sul-dlss","id":230583,"avatar_url":"https://avatars.githubusercontent.com/u/230583?v=3","gravatar_id":"","url":"https://api.github.com/users/sul-dlss","html_url":"https://github.com/sul-dlss","followers_url":"https://api.github.com/users/sul-dlss/followers","following_url":"https://api.github.com/users/sul-dlss/following{/other_user}","gists_url":"https://api.github.com/users/sul-dlss/gists{/gist_id}","starred_url":"https://api.github.com/users/sul-dlss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sul-dlss/subscriptions","organizations_url":"https://api.github.com/users/sul-dlss/orgs","repos_url":"https://api.github.com/users/sul-dlss/repos","events_url":"https://api.github.com/users/sul-dlss/events{/privacy}","received_events_url":"https://api.github.com/users/sul-dlss/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sul-dlss/iiifManifestLayouts","description":"","fork":false,"url":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts","forks_url":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/forks","keys_url":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/teams","hooks_url":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/hooks","issue_events_url":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/issues/events{/number}","events_url":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/events","assignees_url":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/assignees{/user}","branches_url":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/branches{/branch}","tags_url":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/tags","blobs_url":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/git/refs{/sha}","trees_url":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/statuses/{sha}","languages_url":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/languages","stargazers_url":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/stargazers","contributors_url":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/contributors","subscribers_url":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/subscribers","subscription_url":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/subscription","commits_url":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/commits{/sha}","git_commits_url":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/git/commits{/sha}","comments_url":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/comments{/number}","issue_comment_url":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/issues/comments{/number}","contents_url":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/contents/{+path}","compare_url":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/merges","archive_url":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/downloads","issues_url":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/issues{/number}","pulls_url":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/pulls{/number}","milestones_url":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/milestones{/number}","notifications_url":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/labels{/name}","releases_url":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/releases{/id}","created_at":"2015-07-14T16:46:04Z","updated_at":"2015-11-26T09:25:43Z","pushed_at":"2015-12-09T04:21:52Z","git_url":"git://github.com/sul-dlss/iiifManifestLayouts.git","ssh_url":"git@github.com:sul-dlss/iiifManifestLayouts.git","clone_url":"https://github.com/sul-dlss/iiifManifestLayouts.git","svn_url":"https://github.com/sul-dlss/iiifManifestLayouts","homepage":null,"size":4456,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":25,"forks":1,"open_issues":25,"watchers":2,"default_branch":"master"}},"base":{"label":"sul-dlss:master","ref":"master","sha":"900f34c7a671ed0a3b32735aff1715ebe83442b5","user":{"login":"sul-dlss","id":230583,"avatar_url":"https://avatars.githubusercontent.com/u/230583?v=3","gravatar_id":"","url":"https://api.github.com/users/sul-dlss","html_url":"https://github.com/sul-dlss","followers_url":"https://api.github.com/users/sul-dlss/followers","following_url":"https://api.github.com/users/sul-dlss/following{/other_user}","gists_url":"https://api.github.com/users/sul-dlss/gists{/gist_id}","starred_url":"https://api.github.com/users/sul-dlss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sul-dlss/subscriptions","organizations_url":"https://api.github.com/users/sul-dlss/orgs","repos_url":"https://api.github.com/users/sul-dlss/repos","events_url":"https://api.github.com/users/sul-dlss/events{/privacy}","received_events_url":"https://api.github.com/users/sul-dlss/received_events","type":"Organization","site_admin":false},"repo":{"id":39087703,"name":"iiifManifestLayouts","full_name":"sul-dlss/iiifManifestLayouts","owner":{"login":"sul-dlss","id":230583,"avatar_url":"https://avatars.githubusercontent.com/u/230583?v=3","gravatar_id":"","url":"https://api.github.com/users/sul-dlss","html_url":"https://github.com/sul-dlss","followers_url":"https://api.github.com/users/sul-dlss/followers","following_url":"https://api.github.com/users/sul-dlss/following{/other_user}","gists_url":"https://api.github.com/users/sul-dlss/gists{/gist_id}","starred_url":"https://api.github.com/users/sul-dlss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sul-dlss/subscriptions","organizations_url":"https://api.github.com/users/sul-dlss/orgs","repos_url":"https://api.github.com/users/sul-dlss/repos","events_url":"https://api.github.com/users/sul-dlss/events{/privacy}","received_events_url":"https://api.github.com/users/sul-dlss/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sul-dlss/iiifManifestLayouts","description":"","fork":false,"url":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts","forks_url":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/forks","keys_url":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/teams","hooks_url":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/hooks","issue_events_url":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/issues/events{/number}","events_url":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/events","assignees_url":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/assignees{/user}","branches_url":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/branches{/branch}","tags_url":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/tags","blobs_url":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/git/refs{/sha}","trees_url":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/statuses/{sha}","languages_url":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/languages","stargazers_url":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/stargazers","contributors_url":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/contributors","subscribers_url":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/subscribers","subscription_url":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/subscription","commits_url":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/commits{/sha}","git_commits_url":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/git/commits{/sha}","comments_url":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/comments{/number}","issue_comment_url":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/issues/comments{/number}","contents_url":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/contents/{+path}","compare_url":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/merges","archive_url":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/downloads","issues_url":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/issues{/number}","pulls_url":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/pulls{/number}","milestones_url":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/milestones{/number}","notifications_url":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/labels{/name}","releases_url":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/releases{/id}","created_at":"2015-07-14T16:46:04Z","updated_at":"2015-11-26T09:25:43Z","pushed_at":"2015-12-09T04:21:52Z","git_url":"git://github.com/sul-dlss/iiifManifestLayouts.git","ssh_url":"git@github.com:sul-dlss/iiifManifestLayouts.git","clone_url":"https://github.com/sul-dlss/iiifManifestLayouts.git","svn_url":"https://github.com/sul-dlss/iiifManifestLayouts","homepage":null,"size":4456,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":25,"forks":1,"open_issues":25,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/pulls/102"},"html":{"href":"https://github.com/sul-dlss/iiifManifestLayouts/pull/102"},"issue":{"href":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/issues/102"},"comments":{"href":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/issues/102/comments"},"review_comments":{"href":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/pulls/102/comments"},"review_comment":{"href":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/pulls/102/commits"},"statuses":{"href":"https://api.github.com/repos/sul-dlss/iiifManifestLayouts/statuses/3948935cc2d726b3e7ad28c2a2d5c886ef95294d"}}}}