{"action":"created","comment":{"url":"https://api.github.com/repos/cocos-creator/engine/pulls/comments/242020696","pull_request_review_id":185432552,"id":242020696,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0MjAyMDY5Ng==","diff_hunk":"@@ -628,16 +632,41 @@ let Button = cc.Class({\n         }\n     },\n \n+    _setScale (dst, src, zoomScale) {\n+        zoomScale = (zoomScale !== undefined ? zoomScale : 1);\n+        let srcX, srcY;\n+\n+        if (src instanceof cc.Node) {\n+            srcX = src.scaleX;\n+            srcY = src.scaleY;\n+        }\n+        // src is an instance of interface {x, y}\n+        else {\n+            srcX = src.x;\n+            srcY = src.y;\n+        }\n+\n+        if (dst instanceof cc.Node) {\n+            dst.scaleX = srcX * zoomScale;\n+            dst.scaleY = srcY * zoomScale;\n+        }\n+        // dst is an instance of interface {x, y}\n+        else {\n+            dst.x = srcX * zoomScale;\n+            dst.y = srcY * zoomScale;\n+        }","path":"cocos2d/core/components/CCButton.js","position":95,"original_position":95,"commit_id":"fa916899273f129bdb74c7827915279688c88455","original_commit_id":"fa916899273f129bdb74c7827915279688c88455","user":{"login":"pandamicro","id":632460,"node_id":"MDQ6VXNlcjYzMjQ2MA==","avatar_url":"https://avatars2.githubusercontent.com/u/632460?v=4","gravatar_id":"","url":"https://api.github.com/users/pandamicro","html_url":"https://github.com/pandamicro","followers_url":"https://api.github.com/users/pandamicro/followers","following_url":"https://api.github.com/users/pandamicro/following{/other_user}","gists_url":"https://api.github.com/users/pandamicro/gists{/gist_id}","starred_url":"https://api.github.com/users/pandamicro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pandamicro/subscriptions","organizations_url":"https://api.github.com/users/pandamicro/orgs","repos_url":"https://api.github.com/users/pandamicro/repos","events_url":"https://api.github.com/users/pandamicro/events{/privacy}","received_events_url":"https://api.github.com/users/pandamicro/received_events","type":"User","site_admin":false},"body":"这个函数实现直接去掉吧","created_at":"2018-12-17T03:58:45Z","updated_at":"2018-12-17T03:58:52Z","html_url":"https://github.com/cocos-creator/engine/pull/3636#discussion_r242020696","pull_request_url":"https://api.github.com/repos/cocos-creator/engine/pulls/3636","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/cocos-creator/engine/pulls/comments/242020696"},"html":{"href":"https://github.com/cocos-creator/engine/pull/3636#discussion_r242020696"},"pull_request":{"href":"https://api.github.com/repos/cocos-creator/engine/pulls/3636"}}},"pull_request":{"url":"https://api.github.com/repos/cocos-creator/engine/pulls/3636","id":238697088,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM4Njk3MDg4","html_url":"https://github.com/cocos-creator/engine/pull/3636","diff_url":"https://github.com/cocos-creator/engine/pull/3636.diff","patch_url":"https://github.com/cocos-creator/engine/pull/3636.patch","issue_url":"https://api.github.com/repos/cocos-creator/engine/issues/3636","number":3636,"state":"open","locked":false,"title":"fix button scale setting in Scale Mode","user":{"login":"umbrellaPP","id":17872773,"node_id":"MDQ6VXNlcjE3ODcyNzcz","avatar_url":"https://avatars2.githubusercontent.com/u/17872773?v=4","gravatar_id":"","url":"https://api.github.com/users/umbrellaPP","html_url":"https://github.com/umbrellaPP","followers_url":"https://api.github.com/users/umbrellaPP/followers","following_url":"https://api.github.com/users/umbrellaPP/following{/other_user}","gists_url":"https://api.github.com/users/umbrellaPP/gists{/gist_id}","starred_url":"https://api.github.com/users/umbrellaPP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/umbrellaPP/subscriptions","organizations_url":"https://api.github.com/users/umbrellaPP/orgs","repos_url":"https://api.github.com/users/umbrellaPP/repos","events_url":"https://api.github.com/users/umbrellaPP/events{/privacy}","received_events_url":"https://api.github.com/users/umbrellaPP/received_events","type":"User","site_admin":false},"body":"Re: https://github.com/cocos-creator/2d-tasks/issues/868\r\n\r\nchangeLog:\r\n- 修复 button scale 模式下，scaleX 和 scaleY 不统一引起的问题\r\n\r\n额外补充：\r\n- 优化 zoomScale 提示，不建议 zoomScale < 1\r\n","created_at":"2018-12-14T11:49:50Z","updated_at":"2018-12-17T03:58:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fc7e49c7dbc1d0d88dc7bc34491e8e386115f5ab","assignee":{"login":"umbrellaPP","id":17872773,"node_id":"MDQ6VXNlcjE3ODcyNzcz","avatar_url":"https://avatars2.githubusercontent.com/u/17872773?v=4","gravatar_id":"","url":"https://api.github.com/users/umbrellaPP","html_url":"https://github.com/umbrellaPP","followers_url":"https://api.github.com/users/umbrellaPP/followers","following_url":"https://api.github.com/users/umbrellaPP/following{/other_user}","gists_url":"https://api.github.com/users/umbrellaPP/gists{/gist_id}","starred_url":"https://api.github.com/users/umbrellaPP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/umbrellaPP/subscriptions","organizations_url":"https://api.github.com/users/umbrellaPP/orgs","repos_url":"https://api.github.com/users/umbrellaPP/repos","events_url":"https://api.github.com/users/umbrellaPP/events{/privacy}","received_events_url":"https://api.github.com/users/umbrellaPP/received_events","type":"User","site_admin":false},"assignees":[{"login":"umbrellaPP","id":17872773,"node_id":"MDQ6VXNlcjE3ODcyNzcz","avatar_url":"https://avatars2.githubusercontent.com/u/17872773?v=4","gravatar_id":"","url":"https://api.github.com/users/umbrellaPP","html_url":"https://github.com/umbrellaPP","followers_url":"https://api.github.com/users/umbrellaPP/followers","following_url":"https://api.github.com/users/umbrellaPP/following{/other_user}","gists_url":"https://api.github.com/users/umbrellaPP/gists{/gist_id}","starred_url":"https://api.github.com/users/umbrellaPP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/umbrellaPP/subscriptions","organizations_url":"https://api.github.com/users/umbrellaPP/orgs","repos_url":"https://api.github.com/users/umbrellaPP/repos","events_url":"https://api.github.com/users/umbrellaPP/events{/privacy}","received_events_url":"https://api.github.com/users/umbrellaPP/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/cocos-creator/engine/pulls/3636/commits","review_comments_url":"https://api.github.com/repos/cocos-creator/engine/pulls/3636/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/3636/comments","statuses_url":"https://api.github.com/repos/cocos-creator/engine/statuses/fa916899273f129bdb74c7827915279688c88455","head":{"label":"umbrellaPP:2.0_button","ref":"2.0_button","sha":"fa916899273f129bdb74c7827915279688c88455","user":{"login":"umbrellaPP","id":17872773,"node_id":"MDQ6VXNlcjE3ODcyNzcz","avatar_url":"https://avatars2.githubusercontent.com/u/17872773?v=4","gravatar_id":"","url":"https://api.github.com/users/umbrellaPP","html_url":"https://github.com/umbrellaPP","followers_url":"https://api.github.com/users/umbrellaPP/followers","following_url":"https://api.github.com/users/umbrellaPP/following{/other_user}","gists_url":"https://api.github.com/users/umbrellaPP/gists{/gist_id}","starred_url":"https://api.github.com/users/umbrellaPP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/umbrellaPP/subscriptions","organizations_url":"https://api.github.com/users/umbrellaPP/orgs","repos_url":"https://api.github.com/users/umbrellaPP/repos","events_url":"https://api.github.com/users/umbrellaPP/events{/privacy}","received_events_url":"https://api.github.com/users/umbrellaPP/received_events","type":"User","site_admin":false},"repo":{"id":123270908,"node_id":"MDEwOlJlcG9zaXRvcnkxMjMyNzA5MDg=","name":"engine","full_name":"umbrellaPP/engine","private":false,"owner":{"login":"umbrellaPP","id":17872773,"node_id":"MDQ6VXNlcjE3ODcyNzcz","avatar_url":"https://avatars2.githubusercontent.com/u/17872773?v=4","gravatar_id":"","url":"https://api.github.com/users/umbrellaPP","html_url":"https://github.com/umbrellaPP","followers_url":"https://api.github.com/users/umbrellaPP/followers","following_url":"https://api.github.com/users/umbrellaPP/following{/other_user}","gists_url":"https://api.github.com/users/umbrellaPP/gists{/gist_id}","starred_url":"https://api.github.com/users/umbrellaPP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/umbrellaPP/subscriptions","organizations_url":"https://api.github.com/users/umbrellaPP/orgs","repos_url":"https://api.github.com/users/umbrellaPP/repos","events_url":"https://api.github.com/users/umbrellaPP/events{/privacy}","received_events_url":"https://api.github.com/users/umbrellaPP/received_events","type":"User","site_admin":false},"html_url":"https://github.com/umbrellaPP/engine","description":"The engine for Cocos Creator","fork":true,"url":"https://api.github.com/repos/umbrellaPP/engine","forks_url":"https://api.github.com/repos/umbrellaPP/engine/forks","keys_url":"https://api.github.com/repos/umbrellaPP/engine/keys{/key_id}","collaborators_url":"https://api.github.com/repos/umbrellaPP/engine/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/umbrellaPP/engine/teams","hooks_url":"https://api.github.com/repos/umbrellaPP/engine/hooks","issue_events_url":"https://api.github.com/repos/umbrellaPP/engine/issues/events{/number}","events_url":"https://api.github.com/repos/umbrellaPP/engine/events","assignees_url":"https://api.github.com/repos/umbrellaPP/engine/assignees{/user}","branches_url":"https://api.github.com/repos/umbrellaPP/engine/branches{/branch}","tags_url":"https://api.github.com/repos/umbrellaPP/engine/tags","blobs_url":"https://api.github.com/repos/umbrellaPP/engine/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/umbrellaPP/engine/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/umbrellaPP/engine/git/refs{/sha}","trees_url":"https://api.github.com/repos/umbrellaPP/engine/git/trees{/sha}","statuses_url":"https://api.github.com/repos/umbrellaPP/engine/statuses/{sha}","languages_url":"https://api.github.com/repos/umbrellaPP/engine/languages","stargazers_url":"https://api.github.com/repos/umbrellaPP/engine/stargazers","contributors_url":"https://api.github.com/repos/umbrellaPP/engine/contributors","subscribers_url":"https://api.github.com/repos/umbrellaPP/engine/subscribers","subscription_url":"https://api.github.com/repos/umbrellaPP/engine/subscription","commits_url":"https://api.github.com/repos/umbrellaPP/engine/commits{/sha}","git_commits_url":"https://api.github.com/repos/umbrellaPP/engine/git/commits{/sha}","comments_url":"https://api.github.com/repos/umbrellaPP/engine/comments{/number}","issue_comment_url":"https://api.github.com/repos/umbrellaPP/engine/issues/comments{/number}","contents_url":"https://api.github.com/repos/umbrellaPP/engine/contents/{+path}","compare_url":"https://api.github.com/repos/umbrellaPP/engine/compare/{base}...{head}","merges_url":"https://api.github.com/repos/umbrellaPP/engine/merges","archive_url":"https://api.github.com/repos/umbrellaPP/engine/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/umbrellaPP/engine/downloads","issues_url":"https://api.github.com/repos/umbrellaPP/engine/issues{/number}","pulls_url":"https://api.github.com/repos/umbrellaPP/engine/pulls{/number}","milestones_url":"https://api.github.com/repos/umbrellaPP/engine/milestones{/number}","notifications_url":"https://api.github.com/repos/umbrellaPP/engine/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/umbrellaPP/engine/labels{/name}","releases_url":"https://api.github.com/repos/umbrellaPP/engine/releases{/id}","deployments_url":"https://api.github.com/repos/umbrellaPP/engine/deployments","created_at":"2018-02-28T10:43:52Z","updated_at":"2018-07-17T02:17:23Z","pushed_at":"2018-12-14T16:13:45Z","git_url":"git://github.com/umbrellaPP/engine.git","ssh_url":"git@github.com:umbrellaPP/engine.git","clone_url":"https://github.com/umbrellaPP/engine.git","svn_url":"https://github.com/umbrellaPP/engine","homepage":"http://www.cocos2d-x.org/creator","size":39013,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"cocos-creator:v2.0-release","ref":"v2.0-release","sha":"0ec3ba44cf07997b0b05167aa24d873f331071b3","user":{"login":"cocos-creator","id":6937061,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY5MzcwNjE=","avatar_url":"https://avatars3.githubusercontent.com/u/6937061?v=4","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,"node_id":"MDEwOlJlcG9zaXRvcnk0NzQ0MDUzNg==","name":"engine","full_name":"cocos-creator/engine","private":false,"owner":{"login":"cocos-creator","id":6937061,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY5MzcwNjE=","avatar_url":"https://avatars3.githubusercontent.com/u/6937061?v=4","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},"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":"2018-12-17T01:57:51Z","pushed_at":"2018-12-17T03:30:34Z","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":40179,"stargazers_count":844,"watchers_count":844,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":498,"mirror_url":null,"archived":false,"open_issues_count":154,"license":null,"forks":498,"open_issues":154,"watchers":844,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cocos-creator/engine/pulls/3636"},"html":{"href":"https://github.com/cocos-creator/engine/pull/3636"},"issue":{"href":"https://api.github.com/repos/cocos-creator/engine/issues/3636"},"comments":{"href":"https://api.github.com/repos/cocos-creator/engine/issues/3636/comments"},"review_comments":{"href":"https://api.github.com/repos/cocos-creator/engine/pulls/3636/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/3636/commits"},"statuses":{"href":"https://api.github.com/repos/cocos-creator/engine/statuses/fa916899273f129bdb74c7827915279688c88455"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"pandamicro"}}