{"action":"created","comment":{"url":"https://api.github.com/repos/cocos-creator/engine/pulls/comments/57279551","id":57279551,"diff_hunk":"@@ -548,27 +577,41 @@ var Component = cc.Class({\n     _getLocalBounds: null,\n \n     /**\n-     * onRestore is called after the user clicks the Reset item in the Inspector's context menu or performs\n-     * an undo operation on this component.\n-     *\n-     * If the component contains the \"internal state\", short for \"temporary member variables which not included\n-     * in its CCClass properties\", then you may need to implement this function.\n-     *\n-     * The editor will call the getset accessors of your component to record/restore the component's state\n-     * for undo/redo operation. However, in extreme cases, it may not works well. Then you should implement\n-     * this function to manually synchronize your component's \"internal states\" with its public properties.\n-     * Once you implement this function, all the getset accessors of your component will not be called when\n-     * the user performs an undo/redo operation. Which means that only the properties with default value\n-     * will be recorded or restored by editor.\n-     *\n-     * Similarly, the editor may failed to reset your component correctly in extreme cases. Then if you need\n-     * to support the reset menu, you should manually synchronize your component's \"internal states\" with its\n-     * properties in this function. Once you implement this function, all the getset accessors of your component\n-     * will not be called during reset operation. Which means that only the properties with default value\n+     * !#en\n+     * onRestore is called after the user clicks the Reset item in the Inspector's context menu or performs<br/>\n+     * an undo operation on this component.<br/>\n+     * <br/>\n+     * If the component contains the \"internal state\", short for \"temporary member variables which not included<br/>\n+     * in its CCClass properties\", then you may need to implement this function.<br/>\n+     * <br/>\n+     * The editor will call the getset accessors of your component to record/restore the component's state<br/>\n+     * for undo/redo operation. However, in extreme cases, it may not works well. Then you should implement<br/>\n+     * this function to manually synchronize your component's \"internal states\" with its public properties.<br/>\n+     * Once you implement this function, all the getset accessors of your component will not be called when<br/>\n+     * the user performs an undo/redo operation. Which means that only the properties with default value<br/>\n+     * will be recorded or restored by editor.<br/>\n+     * <br/>\n+     * Similarly, the editor may failed to reset your component correctly in extreme cases. Then if you need<br/>\n+     * to support the reset menu, you should manually synchronize your component's \"internal states\" with its<br/>\n+     * properties in this function. Once you implement this function, all the getset accessors of your component<br/>\n+     * will not be called during reset operation. Which means that only the properties with default value<br/>\n      * will be reset by editor.\n      *\n      * This function is only called in editor mode.\n-     *\n+     * !#zh\n+     * onRestore 是用户在检查器菜单点击重置选项时，对此组件执行撤消操作的调用。<br/>\n+     * <br/>\n+     * 如果组件包含了 “internal state”， 除 “其中不包括它的类属性的临时成员变量”以外，那么你可能需要实现此功能。<br/>\n+     * <br/>\n+     * 编辑器将调用组件的 get set 访问录制/恢复组件的状态撤销/重做操作。然而，在极端的情况下，它可能无法运作良好。<br/>\n+     * 那么你应该实现这个功能，手动同步其公共属性组件的 “internal states”。 一旦你实现这个功能当用户执行撤销/重做操作的所有组件\n+     * 的 get set 访问不会被调用。这意味着仅仅使用默认值的属性将被记录或编辑恢复。<br/>\n+     * <br/>\n+     * 同样的，编辑可能无法在极端情况下正确地重置您的组件。<br/>\n+     * 然后，如果你需要支持复位菜单，您应该手动凭借其在该功能特性同步您的组件的 “internal states”。<br/>\n+     * 一旦你实现这个功能，所有的组件的 get set 访问不会在复位操作过程中被调用。这意味着仅仅使用默认值的属性将被编辑复位。<br/>\n+     * <br/>\n+     * 此功能仅在编辑模式下调用。","path":"cocos2d/core/components/CCComponent.js","position":249,"original_position":249,"commit_id":"6daaec58b2c0cc9c9092f2be430d2ca0ab26029c","original_commit_id":"6daaec58b2c0cc9c9092f2be430d2ca0ab26029c","user":{"login":"jareguo","id":1503156,"avatar_url":"https://avatars.githubusercontent.com/u/1503156?v=3","gravatar_id":"","url":"https://api.github.com/users/jareguo","html_url":"https://github.com/jareguo","followers_url":"https://api.github.com/users/jareguo/followers","following_url":"https://api.github.com/users/jareguo/following{/other_user}","gists_url":"https://api.github.com/users/jareguo/gists{/gist_id}","starred_url":"https://api.github.com/users/jareguo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jareguo/subscriptions","organizations_url":"https://api.github.com/users/jareguo/orgs","repos_url":"https://api.github.com/users/jareguo/repos","events_url":"https://api.github.com/users/jareguo/events{/privacy}","received_events_url":"https://api.github.com/users/jareguo/received_events","type":"User","site_admin":false},"body":"此方法仅在编辑器下会被调用。","created_at":"2016-03-24T06:43:09Z","updated_at":"2016-03-24T06:43:09Z","html_url":"https://github.com/cocos-creator/engine/pull/531#discussion_r57279551","pull_request_url":"https://api.github.com/repos/cocos-creator/engine/pulls/531","_links":{"self":{"href":"https://api.github.com/repos/cocos-creator/engine/pulls/comments/57279551"},"html":{"href":"https://github.com/cocos-creator/engine/pull/531#discussion_r57279551"},"pull_request":{"href":"https://api.github.com/repos/cocos-creator/engine/pulls/531"}}},"pull_request":{"url":"https://api.github.com/repos/cocos-creator/engine/pulls/531","id":63983587,"html_url":"https://github.com/cocos-creator/engine/pull/531","diff_url":"https://github.com/cocos-creator/engine/pull/531.diff","patch_url":"https://github.com/cocos-creator/engine/pull/531.patch","issue_url":"https://api.github.com/repos/cocos-creator/engine/issues/531","number":531,"state":"open","locked":false,"title":"update Node and Component API","user":{"login":"knoxHuang","id":7564028,"avatar_url":"https://avatars.githubusercontent.com/u/7564028?v=3","gravatar_id":"","url":"https://api.github.com/users/knoxHuang","html_url":"https://github.com/knoxHuang","followers_url":"https://api.github.com/users/knoxHuang/followers","following_url":"https://api.github.com/users/knoxHuang/following{/other_user}","gists_url":"https://api.github.com/users/knoxHuang/gists{/gist_id}","starred_url":"https://api.github.com/users/knoxHuang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/knoxHuang/subscriptions","organizations_url":"https://api.github.com/users/knoxHuang/orgs","repos_url":"https://api.github.com/users/knoxHuang/repos","events_url":"https://api.github.com/users/knoxHuang/events{/privacy}","received_events_url":"https://api.github.com/users/knoxHuang/received_events","type":"User","site_admin":false},"body":"Re: cocos-creator/fireball#2348\r\n\r\nChanges proposed in this pull request:\r\n- 更新 Node 相关API\r\n- 更新 Component 相关API\r\n\r\n@cocos-creator/engine-admins\r\n","created_at":"2016-03-24T02:57:01Z","updated_at":"2016-03-24T06:43:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ed6fc9497c9ebd43a3da5727ba5a997e4429394c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/cocos-creator/engine/pulls/531/commits","review_comments_url":"https://api.github.com/repos/cocos-creator/engine/pulls/531/comments","review_comment_url":"https://api.github.com/repos/cocos-creator/engine/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cocos-creator/engine/issues/531/comments","statuses_url":"https://api.github.com/repos/cocos-creator/engine/statuses/6daaec58b2c0cc9c9092f2be430d2ca0ab26029c","head":{"label":"knoxHuang:v1.0","ref":"v1.0","sha":"6daaec58b2c0cc9c9092f2be430d2ca0ab26029c","user":{"login":"knoxHuang","id":7564028,"avatar_url":"https://avatars.githubusercontent.com/u/7564028?v=3","gravatar_id":"","url":"https://api.github.com/users/knoxHuang","html_url":"https://github.com/knoxHuang","followers_url":"https://api.github.com/users/knoxHuang/followers","following_url":"https://api.github.com/users/knoxHuang/following{/other_user}","gists_url":"https://api.github.com/users/knoxHuang/gists{/gist_id}","starred_url":"https://api.github.com/users/knoxHuang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/knoxHuang/subscriptions","organizations_url":"https://api.github.com/users/knoxHuang/orgs","repos_url":"https://api.github.com/users/knoxHuang/repos","events_url":"https://api.github.com/users/knoxHuang/events{/privacy}","received_events_url":"https://api.github.com/users/knoxHuang/received_events","type":"User","site_admin":false},"repo":{"id":54607474,"name":"engine-2","full_name":"knoxHuang/engine-2","owner":{"login":"knoxHuang","id":7564028,"avatar_url":"https://avatars.githubusercontent.com/u/7564028?v=3","gravatar_id":"","url":"https://api.github.com/users/knoxHuang","html_url":"https://github.com/knoxHuang","followers_url":"https://api.github.com/users/knoxHuang/followers","following_url":"https://api.github.com/users/knoxHuang/following{/other_user}","gists_url":"https://api.github.com/users/knoxHuang/gists{/gist_id}","starred_url":"https://api.github.com/users/knoxHuang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/knoxHuang/subscriptions","organizations_url":"https://api.github.com/users/knoxHuang/orgs","repos_url":"https://api.github.com/users/knoxHuang/repos","events_url":"https://api.github.com/users/knoxHuang/events{/privacy}","received_events_url":"https://api.github.com/users/knoxHuang/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/knoxHuang/engine-2","description":"New integrated engine to replace cocos2d-html5","fork":true,"url":"https://api.github.com/repos/knoxHuang/engine-2","forks_url":"https://api.github.com/repos/knoxHuang/engine-2/forks","keys_url":"https://api.github.com/repos/knoxHuang/engine-2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/knoxHuang/engine-2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/knoxHuang/engine-2/teams","hooks_url":"https://api.github.com/repos/knoxHuang/engine-2/hooks","issue_events_url":"https://api.github.com/repos/knoxHuang/engine-2/issues/events{/number}","events_url":"https://api.github.com/repos/knoxHuang/engine-2/events","assignees_url":"https://api.github.com/repos/knoxHuang/engine-2/assignees{/user}","branches_url":"https://api.github.com/repos/knoxHuang/engine-2/branches{/branch}","tags_url":"https://api.github.com/repos/knoxHuang/engine-2/tags","blobs_url":"https://api.github.com/repos/knoxHuang/engine-2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/knoxHuang/engine-2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/knoxHuang/engine-2/git/refs{/sha}","trees_url":"https://api.github.com/repos/knoxHuang/engine-2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/knoxHuang/engine-2/statuses/{sha}","languages_url":"https://api.github.com/repos/knoxHuang/engine-2/languages","stargazers_url":"https://api.github.com/repos/knoxHuang/engine-2/stargazers","contributors_url":"https://api.github.com/repos/knoxHuang/engine-2/contributors","subscribers_url":"https://api.github.com/repos/knoxHuang/engine-2/subscribers","subscription_url":"https://api.github.com/repos/knoxHuang/engine-2/subscription","commits_url":"https://api.github.com/repos/knoxHuang/engine-2/commits{/sha}","git_commits_url":"https://api.github.com/repos/knoxHuang/engine-2/git/commits{/sha}","comments_url":"https://api.github.com/repos/knoxHuang/engine-2/comments{/number}","issue_comment_url":"https://api.github.com/repos/knoxHuang/engine-2/issues/comments{/number}","contents_url":"https://api.github.com/repos/knoxHuang/engine-2/contents/{+path}","compare_url":"https://api.github.com/repos/knoxHuang/engine-2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/knoxHuang/engine-2/merges","archive_url":"https://api.github.com/repos/knoxHuang/engine-2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/knoxHuang/engine-2/downloads","issues_url":"https://api.github.com/repos/knoxHuang/engine-2/issues{/number}","pulls_url":"https://api.github.com/repos/knoxHuang/engine-2/pulls{/number}","milestones_url":"https://api.github.com/repos/knoxHuang/engine-2/milestones{/number}","notifications_url":"https://api.github.com/repos/knoxHuang/engine-2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/knoxHuang/engine-2/labels{/name}","releases_url":"https://api.github.com/repos/knoxHuang/engine-2/releases{/id}","deployments_url":"https://api.github.com/repos/knoxHuang/engine-2/deployments","created_at":"2016-03-24T02:09:50Z","updated_at":"2016-03-24T02:09:54Z","pushed_at":"2016-03-24T03:19:20Z","git_url":"git://github.com/knoxHuang/engine-2.git","ssh_url":"git@github.com:knoxHuang/engine-2.git","clone_url":"https://github.com/knoxHuang/engine-2.git","svn_url":"https://github.com/knoxHuang/engine-2","homepage":null,"size":23120,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"cocos-creator:v1.0","ref":"v1.0","sha":"00abde8df1281235d7a430879d04904e5e9e00d2","user":{"login":"cocos-creator","id":6937061,"avatar_url":"https://avatars.githubusercontent.com/u/6937061?v=3","gravatar_id":"","url":"https://api.github.com/users/cocos-creator","html_url":"https://github.com/cocos-creator","followers_url":"https://api.github.com/users/cocos-creator/followers","following_url":"https://api.github.com/users/cocos-creator/following{/other_user}","gists_url":"https://api.github.com/users/cocos-creator/gists{/gist_id}","starred_url":"https://api.github.com/users/cocos-creator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cocos-creator/subscriptions","organizations_url":"https://api.github.com/users/cocos-creator/orgs","repos_url":"https://api.github.com/users/cocos-creator/repos","events_url":"https://api.github.com/users/cocos-creator/events{/privacy}","received_events_url":"https://api.github.com/users/cocos-creator/received_events","type":"Organization","site_admin":false},"repo":{"id":47440536,"name":"engine","full_name":"cocos-creator/engine","owner":{"login":"cocos-creator","id":6937061,"avatar_url":"https://avatars.githubusercontent.com/u/6937061?v=3","gravatar_id":"","url":"https://api.github.com/users/cocos-creator","html_url":"https://github.com/cocos-creator","followers_url":"https://api.github.com/users/cocos-creator/followers","following_url":"https://api.github.com/users/cocos-creator/following{/other_user}","gists_url":"https://api.github.com/users/cocos-creator/gists{/gist_id}","starred_url":"https://api.github.com/users/cocos-creator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cocos-creator/subscriptions","organizations_url":"https://api.github.com/users/cocos-creator/orgs","repos_url":"https://api.github.com/users/cocos-creator/repos","events_url":"https://api.github.com/users/cocos-creator/events{/privacy}","received_events_url":"https://api.github.com/users/cocos-creator/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cocos-creator/engine","description":"The engine for Cocos Creator","fork":false,"url":"https://api.github.com/repos/cocos-creator/engine","forks_url":"https://api.github.com/repos/cocos-creator/engine/forks","keys_url":"https://api.github.com/repos/cocos-creator/engine/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cocos-creator/engine/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cocos-creator/engine/teams","hooks_url":"https://api.github.com/repos/cocos-creator/engine/hooks","issue_events_url":"https://api.github.com/repos/cocos-creator/engine/issues/events{/number}","events_url":"https://api.github.com/repos/cocos-creator/engine/events","assignees_url":"https://api.github.com/repos/cocos-creator/engine/assignees{/user}","branches_url":"https://api.github.com/repos/cocos-creator/engine/branches{/branch}","tags_url":"https://api.github.com/repos/cocos-creator/engine/tags","blobs_url":"https://api.github.com/repos/cocos-creator/engine/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cocos-creator/engine/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cocos-creator/engine/git/refs{/sha}","trees_url":"https://api.github.com/repos/cocos-creator/engine/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cocos-creator/engine/statuses/{sha}","languages_url":"https://api.github.com/repos/cocos-creator/engine/languages","stargazers_url":"https://api.github.com/repos/cocos-creator/engine/stargazers","contributors_url":"https://api.github.com/repos/cocos-creator/engine/contributors","subscribers_url":"https://api.github.com/repos/cocos-creator/engine/subscribers","subscription_url":"https://api.github.com/repos/cocos-creator/engine/subscription","commits_url":"https://api.github.com/repos/cocos-creator/engine/commits{/sha}","git_commits_url":"https://api.github.com/repos/cocos-creator/engine/git/commits{/sha}","comments_url":"https://api.github.com/repos/cocos-creator/engine/comments{/number}","issue_comment_url":"https://api.github.com/repos/cocos-creator/engine/issues/comments{/number}","contents_url":"https://api.github.com/repos/cocos-creator/engine/contents/{+path}","compare_url":"https://api.github.com/repos/cocos-creator/engine/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cocos-creator/engine/merges","archive_url":"https://api.github.com/repos/cocos-creator/engine/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cocos-creator/engine/downloads","issues_url":"https://api.github.com/repos/cocos-creator/engine/issues{/number}","pulls_url":"https://api.github.com/repos/cocos-creator/engine/pulls{/number}","milestones_url":"https://api.github.com/repos/cocos-creator/engine/milestones{/number}","notifications_url":"https://api.github.com/repos/cocos-creator/engine/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cocos-creator/engine/labels{/name}","releases_url":"https://api.github.com/repos/cocos-creator/engine/releases{/id}","deployments_url":"https://api.github.com/repos/cocos-creator/engine/deployments","created_at":"2015-12-05T03:28:59Z","updated_at":"2016-03-24T06:11:08Z","pushed_at":"2016-03-24T03:19:21Z","git_url":"git://github.com/cocos-creator/engine.git","ssh_url":"git@github.com:cocos-creator/engine.git","clone_url":"https://github.com/cocos-creator/engine.git","svn_url":"https://github.com/cocos-creator/engine","homepage":"http://www.cocos2d-x.org/creator","size":23117,"stargazers_count":4,"watchers_count":4,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":1,"forks":7,"open_issues":1,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cocos-creator/engine/pulls/531"},"html":{"href":"https://github.com/cocos-creator/engine/pull/531"},"issue":{"href":"https://api.github.com/repos/cocos-creator/engine/issues/531"},"comments":{"href":"https://api.github.com/repos/cocos-creator/engine/issues/531/comments"},"review_comments":{"href":"https://api.github.com/repos/cocos-creator/engine/pulls/531/comments"},"review_comment":{"href":"https://api.github.com/repos/cocos-creator/engine/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cocos-creator/engine/pulls/531/commits"},"statuses":{"href":"https://api.github.com/repos/cocos-creator/engine/statuses/6daaec58b2c0cc9c9092f2be430d2ca0ab26029c"}}}}