{"action":"created","comment":{"url":"https://api.github.com/repos/adobe-photoshop/spaces-design/pulls/comments/45271303","id":45271303,"diff_hunk":"@@ -537,34 +652,38 @@ define(function (require, exports, module) {\n             resolution = object.getPath(document, \"resolution._value\");\n         }\n \n-        var model = {\n-            documentID: documentID,\n-            id: id,\n-            key: documentID + \".\" + id,\n-            name: layerDescriptor.name,\n-            kind: layerDescriptor.layerKind,\n-            visible: layerDescriptor.visible,\n-            expanded: _extractExpanded(layerDescriptor),\n-            locked: _extractLocked(layerDescriptor),\n-            isBackground: layerDescriptor.background,\n-            opacity: _extractOpacity(layerDescriptor),\n-            selected: selected,\n-            bounds: Bounds.fromLayerDescriptor(layerDescriptor),\n-            radii: Radii.fromLayerDescriptor(layerDescriptor),\n-            stroke: Stroke.fromLayerDescriptor(layerDescriptor),\n-            fill: Fill.fromLayerDescriptor(layerDescriptor),\n-            effects: LayerEffect.fromLayerDescriptor(layerDescriptor),\n-            text: Text.fromLayerDescriptor(resolution, layerDescriptor),\n-            proportionalScaling: layerDescriptor.proportionalScaling,\n-            isArtboard: layerDescriptor.artboardEnabled,\n-            vectorMaskEnabled: layerDescriptor.vectorMaskEnabled,\n-            exportEnabled: exportEnabled,\n-            vectorMaskEmpty: layerDescriptor.vectorMaskEmpty,\n-            textWarningLevel: layerDescriptor.textWarningLevel,\n-            isLinked: _extractIsLinked(layerDescriptor),\n-            initialized: initialized || selected\n-            // if not explicitly marked as initialized, then it is initialized iff it is selected\n-        };\n+        var Bounds = require(\"./bounds\"),\n+            Fill = require(\"./fill\"),","path":"src/js/models/layer.js","position":326,"original_position":326,"commit_id":"e839da377624ae9e76082c2a1c2aec945098fa26","original_commit_id":"e839da377624ae9e76082c2a1c2aec945098fa26","user":{"login":"volfied","id":386714,"avatar_url":"https://avatars.githubusercontent.com/u/386714?v=3","gravatar_id":"","url":"https://api.github.com/users/volfied","html_url":"https://github.com/volfied","followers_url":"https://api.github.com/users/volfied/followers","following_url":"https://api.github.com/users/volfied/following{/other_user}","gists_url":"https://api.github.com/users/volfied/gists{/gist_id}","starred_url":"https://api.github.com/users/volfied/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/volfied/subscriptions","organizations_url":"https://api.github.com/users/volfied/orgs","repos_url":"https://api.github.com/users/volfied/repos","events_url":"https://api.github.com/users/volfied/events{/privacy}","received_events_url":"https://api.github.com/users/volfied/received_events","type":"User","site_admin":false},"body":"Ditto","created_at":"2015-11-18T22:33:31Z","updated_at":"2015-11-18T22:33:31Z","html_url":"https://github.com/adobe-photoshop/spaces-design/pull/3273#discussion_r45271303","pull_request_url":"https://api.github.com/repos/adobe-photoshop/spaces-design/pulls/3273","_links":{"self":{"href":"https://api.github.com/repos/adobe-photoshop/spaces-design/pulls/comments/45271303"},"html":{"href":"https://github.com/adobe-photoshop/spaces-design/pull/3273#discussion_r45271303"},"pull_request":{"href":"https://api.github.com/repos/adobe-photoshop/spaces-design/pulls/3273"}}},"pull_request":{"url":"https://api.github.com/repos/adobe-photoshop/spaces-design/pulls/3273","id":51149803,"html_url":"https://github.com/adobe-photoshop/spaces-design/pull/3273","diff_url":"https://github.com/adobe-photoshop/spaces-design/pull/3273.diff","patch_url":"https://github.com/adobe-photoshop/spaces-design/pull/3273.patch","issue_url":"https://api.github.com/repos/adobe-photoshop/spaces-design/issues/3273","number":3273,"state":"open","locked":false,"title":"Refactor Layer kinds","user":{"login":"shaoshing","id":118264,"avatar_url":"https://avatars.githubusercontent.com/u/118264?v=3","gravatar_id":"","url":"https://api.github.com/users/shaoshing","html_url":"https://github.com/shaoshing","followers_url":"https://api.github.com/users/shaoshing/followers","following_url":"https://api.github.com/users/shaoshing/following{/other_user}","gists_url":"https://api.github.com/users/shaoshing/gists{/gist_id}","starred_url":"https://api.github.com/users/shaoshing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shaoshing/subscriptions","organizations_url":"https://api.github.com/users/shaoshing/orgs","repos_url":"https://api.github.com/users/shaoshing/repos","events_url":"https://api.github.com/users/shaoshing/events{/privacy}","received_events_url":"https://api.github.com/users/shaoshing/received_events","type":"User","site_admin":false},"body":"##### Unified Layer kind enumerable \r\n\r\nBefore we used three different ways of accessing the layer kinds list:\r\n\r\n* Layer.layerKinds\r\n* layer.layerKinds (Layer instance)\r\n* layerLib.layerKinds (direct access from the adapter)\r\n\r\nNow the unified way is\r\n\r\n* Layer.KINDS\r\n\r\n##### Use string value for `Layer#kind`, instead of number.\r\n\r\nFor example, `layer.kind` will return `GROUP`, instead of `7`. Here are some benefits\r\n\r\n* easier for debugging\r\n* easier to use meaningful names in CSS / icon files and translations\r\n\r\n##### Added new properties for layer kind checking\r\n\r\nLayer has the following new properties:\r\n\r\n* isText (replaced Layer#isTextLayer())\r\n* isVector (replaced Layer#isVector())\r\n* isSmartObject (replaced Layer#isSmartObject())\r\n* isPixel\r\n* isAdjustment\r\n* isGroup\r\n* isGroupEnd\r\n* is3D\r\n* isVideo\r\n\r\n\r\n\r\n\r\n\r\n","created_at":"2015-11-18T22:08:28Z","updated_at":"2015-11-18T22:33:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cf5e3586975bb480b4cae3a8b649c24eb1ffa501","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/adobe-photoshop/spaces-design/pulls/3273/commits","review_comments_url":"https://api.github.com/repos/adobe-photoshop/spaces-design/pulls/3273/comments","review_comment_url":"https://api.github.com/repos/adobe-photoshop/spaces-design/pulls/comments{/number}","comments_url":"https://api.github.com/repos/adobe-photoshop/spaces-design/issues/3273/comments","statuses_url":"https://api.github.com/repos/adobe-photoshop/spaces-design/statuses/e839da377624ae9e76082c2a1c2aec945098fa26","head":{"label":"adobe-photoshop:shao/layer-kinds","ref":"shao/layer-kinds","sha":"e839da377624ae9e76082c2a1c2aec945098fa26","user":{"login":"adobe-photoshop","id":4542585,"avatar_url":"https://avatars.githubusercontent.com/u/4542585?v=3","gravatar_id":"","url":"https://api.github.com/users/adobe-photoshop","html_url":"https://github.com/adobe-photoshop","followers_url":"https://api.github.com/users/adobe-photoshop/followers","following_url":"https://api.github.com/users/adobe-photoshop/following{/other_user}","gists_url":"https://api.github.com/users/adobe-photoshop/gists{/gist_id}","starred_url":"https://api.github.com/users/adobe-photoshop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adobe-photoshop/subscriptions","organizations_url":"https://api.github.com/users/adobe-photoshop/orgs","repos_url":"https://api.github.com/users/adobe-photoshop/repos","events_url":"https://api.github.com/users/adobe-photoshop/events{/privacy}","received_events_url":"https://api.github.com/users/adobe-photoshop/received_events","type":"Organization","site_admin":false},"repo":{"id":37291353,"name":"spaces-design","full_name":"adobe-photoshop/spaces-design","owner":{"login":"adobe-photoshop","id":4542585,"avatar_url":"https://avatars.githubusercontent.com/u/4542585?v=3","gravatar_id":"","url":"https://api.github.com/users/adobe-photoshop","html_url":"https://github.com/adobe-photoshop","followers_url":"https://api.github.com/users/adobe-photoshop/followers","following_url":"https://api.github.com/users/adobe-photoshop/following{/other_user}","gists_url":"https://api.github.com/users/adobe-photoshop/gists{/gist_id}","starred_url":"https://api.github.com/users/adobe-photoshop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adobe-photoshop/subscriptions","organizations_url":"https://api.github.com/users/adobe-photoshop/orgs","repos_url":"https://api.github.com/users/adobe-photoshop/repos","events_url":"https://api.github.com/users/adobe-photoshop/events{/privacy}","received_events_url":"https://api.github.com/users/adobe-photoshop/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/adobe-photoshop/spaces-design","description":"Adobe Photoshop Design Space","fork":false,"url":"https://api.github.com/repos/adobe-photoshop/spaces-design","forks_url":"https://api.github.com/repos/adobe-photoshop/spaces-design/forks","keys_url":"https://api.github.com/repos/adobe-photoshop/spaces-design/keys{/key_id}","collaborators_url":"https://api.github.com/repos/adobe-photoshop/spaces-design/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/adobe-photoshop/spaces-design/teams","hooks_url":"https://api.github.com/repos/adobe-photoshop/spaces-design/hooks","issue_events_url":"https://api.github.com/repos/adobe-photoshop/spaces-design/issues/events{/number}","events_url":"https://api.github.com/repos/adobe-photoshop/spaces-design/events","assignees_url":"https://api.github.com/repos/adobe-photoshop/spaces-design/assignees{/user}","branches_url":"https://api.github.com/repos/adobe-photoshop/spaces-design/branches{/branch}","tags_url":"https://api.github.com/repos/adobe-photoshop/spaces-design/tags","blobs_url":"https://api.github.com/repos/adobe-photoshop/spaces-design/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/adobe-photoshop/spaces-design/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/adobe-photoshop/spaces-design/git/refs{/sha}","trees_url":"https://api.github.com/repos/adobe-photoshop/spaces-design/git/trees{/sha}","statuses_url":"https://api.github.com/repos/adobe-photoshop/spaces-design/statuses/{sha}","languages_url":"https://api.github.com/repos/adobe-photoshop/spaces-design/languages","stargazers_url":"https://api.github.com/repos/adobe-photoshop/spaces-design/stargazers","contributors_url":"https://api.github.com/repos/adobe-photoshop/spaces-design/contributors","subscribers_url":"https://api.github.com/repos/adobe-photoshop/spaces-design/subscribers","subscription_url":"https://api.github.com/repos/adobe-photoshop/spaces-design/subscription","commits_url":"https://api.github.com/repos/adobe-photoshop/spaces-design/commits{/sha}","git_commits_url":"https://api.github.com/repos/adobe-photoshop/spaces-design/git/commits{/sha}","comments_url":"https://api.github.com/repos/adobe-photoshop/spaces-design/comments{/number}","issue_comment_url":"https://api.github.com/repos/adobe-photoshop/spaces-design/issues/comments{/number}","contents_url":"https://api.github.com/repos/adobe-photoshop/spaces-design/contents/{+path}","compare_url":"https://api.github.com/repos/adobe-photoshop/spaces-design/compare/{base}...{head}","merges_url":"https://api.github.com/repos/adobe-photoshop/spaces-design/merges","archive_url":"https://api.github.com/repos/adobe-photoshop/spaces-design/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/adobe-photoshop/spaces-design/downloads","issues_url":"https://api.github.com/repos/adobe-photoshop/spaces-design/issues{/number}","pulls_url":"https://api.github.com/repos/adobe-photoshop/spaces-design/pulls{/number}","milestones_url":"https://api.github.com/repos/adobe-photoshop/spaces-design/milestones{/number}","notifications_url":"https://api.github.com/repos/adobe-photoshop/spaces-design/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/adobe-photoshop/spaces-design/labels{/name}","releases_url":"https://api.github.com/repos/adobe-photoshop/spaces-design/releases{/id}","created_at":"2015-06-11T23:23:47Z","updated_at":"2015-11-18T17:18:02Z","pushed_at":"2015-11-18T22:08:29Z","git_url":"git://github.com/adobe-photoshop/spaces-design.git","ssh_url":"git@github.com:adobe-photoshop/spaces-design.git","clone_url":"https://github.com/adobe-photoshop/spaces-design.git","svn_url":"https://github.com/adobe-photoshop/spaces-design","homepage":"http://adobe-photoshop.github.io/","size":23107,"stargazers_count":642,"watchers_count":642,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":41,"mirror_url":null,"open_issues_count":224,"forks":41,"open_issues":224,"watchers":642,"default_branch":"master"}},"base":{"label":"adobe-photoshop:master","ref":"master","sha":"f71de8eab3178b5582b97b54d52ff1ddd989fc73","user":{"login":"adobe-photoshop","id":4542585,"avatar_url":"https://avatars.githubusercontent.com/u/4542585?v=3","gravatar_id":"","url":"https://api.github.com/users/adobe-photoshop","html_url":"https://github.com/adobe-photoshop","followers_url":"https://api.github.com/users/adobe-photoshop/followers","following_url":"https://api.github.com/users/adobe-photoshop/following{/other_user}","gists_url":"https://api.github.com/users/adobe-photoshop/gists{/gist_id}","starred_url":"https://api.github.com/users/adobe-photoshop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adobe-photoshop/subscriptions","organizations_url":"https://api.github.com/users/adobe-photoshop/orgs","repos_url":"https://api.github.com/users/adobe-photoshop/repos","events_url":"https://api.github.com/users/adobe-photoshop/events{/privacy}","received_events_url":"https://api.github.com/users/adobe-photoshop/received_events","type":"Organization","site_admin":false},"repo":{"id":37291353,"name":"spaces-design","full_name":"adobe-photoshop/spaces-design","owner":{"login":"adobe-photoshop","id":4542585,"avatar_url":"https://avatars.githubusercontent.com/u/4542585?v=3","gravatar_id":"","url":"https://api.github.com/users/adobe-photoshop","html_url":"https://github.com/adobe-photoshop","followers_url":"https://api.github.com/users/adobe-photoshop/followers","following_url":"https://api.github.com/users/adobe-photoshop/following{/other_user}","gists_url":"https://api.github.com/users/adobe-photoshop/gists{/gist_id}","starred_url":"https://api.github.com/users/adobe-photoshop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adobe-photoshop/subscriptions","organizations_url":"https://api.github.com/users/adobe-photoshop/orgs","repos_url":"https://api.github.com/users/adobe-photoshop/repos","events_url":"https://api.github.com/users/adobe-photoshop/events{/privacy}","received_events_url":"https://api.github.com/users/adobe-photoshop/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/adobe-photoshop/spaces-design","description":"Adobe Photoshop Design Space","fork":false,"url":"https://api.github.com/repos/adobe-photoshop/spaces-design","forks_url":"https://api.github.com/repos/adobe-photoshop/spaces-design/forks","keys_url":"https://api.github.com/repos/adobe-photoshop/spaces-design/keys{/key_id}","collaborators_url":"https://api.github.com/repos/adobe-photoshop/spaces-design/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/adobe-photoshop/spaces-design/teams","hooks_url":"https://api.github.com/repos/adobe-photoshop/spaces-design/hooks","issue_events_url":"https://api.github.com/repos/adobe-photoshop/spaces-design/issues/events{/number}","events_url":"https://api.github.com/repos/adobe-photoshop/spaces-design/events","assignees_url":"https://api.github.com/repos/adobe-photoshop/spaces-design/assignees{/user}","branches_url":"https://api.github.com/repos/adobe-photoshop/spaces-design/branches{/branch}","tags_url":"https://api.github.com/repos/adobe-photoshop/spaces-design/tags","blobs_url":"https://api.github.com/repos/adobe-photoshop/spaces-design/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/adobe-photoshop/spaces-design/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/adobe-photoshop/spaces-design/git/refs{/sha}","trees_url":"https://api.github.com/repos/adobe-photoshop/spaces-design/git/trees{/sha}","statuses_url":"https://api.github.com/repos/adobe-photoshop/spaces-design/statuses/{sha}","languages_url":"https://api.github.com/repos/adobe-photoshop/spaces-design/languages","stargazers_url":"https://api.github.com/repos/adobe-photoshop/spaces-design/stargazers","contributors_url":"https://api.github.com/repos/adobe-photoshop/spaces-design/contributors","subscribers_url":"https://api.github.com/repos/adobe-photoshop/spaces-design/subscribers","subscription_url":"https://api.github.com/repos/adobe-photoshop/spaces-design/subscription","commits_url":"https://api.github.com/repos/adobe-photoshop/spaces-design/commits{/sha}","git_commits_url":"https://api.github.com/repos/adobe-photoshop/spaces-design/git/commits{/sha}","comments_url":"https://api.github.com/repos/adobe-photoshop/spaces-design/comments{/number}","issue_comment_url":"https://api.github.com/repos/adobe-photoshop/spaces-design/issues/comments{/number}","contents_url":"https://api.github.com/repos/adobe-photoshop/spaces-design/contents/{+path}","compare_url":"https://api.github.com/repos/adobe-photoshop/spaces-design/compare/{base}...{head}","merges_url":"https://api.github.com/repos/adobe-photoshop/spaces-design/merges","archive_url":"https://api.github.com/repos/adobe-photoshop/spaces-design/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/adobe-photoshop/spaces-design/downloads","issues_url":"https://api.github.com/repos/adobe-photoshop/spaces-design/issues{/number}","pulls_url":"https://api.github.com/repos/adobe-photoshop/spaces-design/pulls{/number}","milestones_url":"https://api.github.com/repos/adobe-photoshop/spaces-design/milestones{/number}","notifications_url":"https://api.github.com/repos/adobe-photoshop/spaces-design/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/adobe-photoshop/spaces-design/labels{/name}","releases_url":"https://api.github.com/repos/adobe-photoshop/spaces-design/releases{/id}","created_at":"2015-06-11T23:23:47Z","updated_at":"2015-11-18T17:18:02Z","pushed_at":"2015-11-18T22:08:29Z","git_url":"git://github.com/adobe-photoshop/spaces-design.git","ssh_url":"git@github.com:adobe-photoshop/spaces-design.git","clone_url":"https://github.com/adobe-photoshop/spaces-design.git","svn_url":"https://github.com/adobe-photoshop/spaces-design","homepage":"http://adobe-photoshop.github.io/","size":23107,"stargazers_count":642,"watchers_count":642,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":41,"mirror_url":null,"open_issues_count":224,"forks":41,"open_issues":224,"watchers":642,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/adobe-photoshop/spaces-design/pulls/3273"},"html":{"href":"https://github.com/adobe-photoshop/spaces-design/pull/3273"},"issue":{"href":"https://api.github.com/repos/adobe-photoshop/spaces-design/issues/3273"},"comments":{"href":"https://api.github.com/repos/adobe-photoshop/spaces-design/issues/3273/comments"},"review_comments":{"href":"https://api.github.com/repos/adobe-photoshop/spaces-design/pulls/3273/comments"},"review_comment":{"href":"https://api.github.com/repos/adobe-photoshop/spaces-design/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/adobe-photoshop/spaces-design/pulls/3273/commits"},"statuses":{"href":"https://api.github.com/repos/adobe-photoshop/spaces-design/statuses/e839da377624ae9e76082c2a1c2aec945098fa26"}}}}