{"action":"created","comment":{"url":"https://api.github.com/repos/fireball-x/engine/pulls/comments/24065109","id":24065109,"diff_hunk":"@@ -136,21 +134,30 @@ RenderContext.prototype.addBitmapText = function (target) {\n \n PixiBitmapFontUtil.updateTransform = function (target, tempMatrix) {\n     var i = 0, childrens = null, len = 0, child = null;\n-    var isGameView = Engine._curRenderContext === Engine._renderContext;\n-    if (isGameView) {\n-        target._renderObj.updateText();\n-        childrens = target._renderObj.children;\n-        for (len = childrens.length; i < len; i++) {\n-            child = childrens[i];\n-            child.worldTransform = _getNewMatrix23(child, tempMatrix);\n+    if (target._renderObj) {\n+        var isGameView = Engine._curRenderContext === Engine._renderContext;\n+        if (isGameView) {\n+            if (target._renderObj.dirty) {\n+                target._renderObj.updateText();\n+                target._renderObj.dirty = false;\n+            }\n+            childrens = target._renderObj.children;\n+            for (len = childrens.length; i < len; i++) {\n+                child = childrens[i];\n+                child.worldTransform = _getNewMatrix23(child, tempMatrix);\n+            }\n         }\n-    }\n-    else if (target._renderObjInScene) {\n-        target._renderObjInScene.updateText();\n-        childrens = target._renderObjInScene.children;\n-        for (i = 0, len = childrens.length; i < len; i++) {\n-            child = childrens[i];\n-            child.worldTransform = _getNewMatrix23(child, tempMatrix);\n+\n+        if (target._renderObjInScene) {","path":"src/bitmapfont/pixi-bitmap-font-util.js","position":64,"original_position":64,"commit_id":"ad13f478ac5e24405d748ad19f3aa683452948e9","original_commit_id":"ad13f478ac5e24405d748ad19f3aa683452948e9","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":"为什么要把 else if 改成 if？","created_at":"2015-02-04T06:34:43Z","updated_at":"2015-02-04T06:34:43Z","html_url":"https://github.com/fireball-x/engine/pull/52#discussion_r24065109","pull_request_url":"https://api.github.com/repos/fireball-x/engine/pulls/52","_links":{"self":{"href":"https://api.github.com/repos/fireball-x/engine/pulls/comments/24065109"},"html":{"href":"https://github.com/fireball-x/engine/pull/52#discussion_r24065109"},"pull_request":{"href":"https://api.github.com/repos/fireball-x/engine/pulls/52"}}},"pull_request":{"url":"https://api.github.com/repos/fireball-x/engine/pulls/52","id":28616160,"html_url":"https://github.com/fireball-x/engine/pull/52","diff_url":"https://github.com/fireball-x/engine/pull/52.diff","patch_url":"https://github.com/fireball-x/engine/pull/52.patch","issue_url":"https://api.github.com/repos/fireball-x/engine/issues/52","number":52,"state":"open","locked":false,"title":"1. fix bitmap-text bug","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":"@jareguo ","created_at":"2015-02-04T06:28:11Z","updated_at":"2015-02-04T06:34:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b7faacbe9ce4ff0cd969f7fb7b3a02f6dba32b8e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/fireball-x/engine/pulls/52/commits","review_comments_url":"https://api.github.com/repos/fireball-x/engine/pulls/52/comments","review_comment_url":"https://api.github.com/repos/fireball-x/engine/pulls/comments/{number}","comments_url":"https://api.github.com/repos/fireball-x/engine/issues/52/comments","statuses_url":"https://api.github.com/repos/fireball-x/engine/statuses/ad13f478ac5e24405d748ad19f3aa683452948e9","head":{"label":"knoxHuang:bitmapFont","ref":"bitmapFont","sha":"ad13f478ac5e24405d748ad19f3aa683452948e9","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":28794247,"name":"engine","full_name":"knoxHuang/engine","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","description":"The fireball engine","fork":true,"url":"https://api.github.com/repos/knoxHuang/engine","forks_url":"https://api.github.com/repos/knoxHuang/engine/forks","keys_url":"https://api.github.com/repos/knoxHuang/engine/keys{/key_id}","collaborators_url":"https://api.github.com/repos/knoxHuang/engine/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/knoxHuang/engine/teams","hooks_url":"https://api.github.com/repos/knoxHuang/engine/hooks","issue_events_url":"https://api.github.com/repos/knoxHuang/engine/issues/events{/number}","events_url":"https://api.github.com/repos/knoxHuang/engine/events","assignees_url":"https://api.github.com/repos/knoxHuang/engine/assignees{/user}","branches_url":"https://api.github.com/repos/knoxHuang/engine/branches{/branch}","tags_url":"https://api.github.com/repos/knoxHuang/engine/tags","blobs_url":"https://api.github.com/repos/knoxHuang/engine/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/knoxHuang/engine/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/knoxHuang/engine/git/refs{/sha}","trees_url":"https://api.github.com/repos/knoxHuang/engine/git/trees{/sha}","statuses_url":"https://api.github.com/repos/knoxHuang/engine/statuses/{sha}","languages_url":"https://api.github.com/repos/knoxHuang/engine/languages","stargazers_url":"https://api.github.com/repos/knoxHuang/engine/stargazers","contributors_url":"https://api.github.com/repos/knoxHuang/engine/contributors","subscribers_url":"https://api.github.com/repos/knoxHuang/engine/subscribers","subscription_url":"https://api.github.com/repos/knoxHuang/engine/subscription","commits_url":"https://api.github.com/repos/knoxHuang/engine/commits{/sha}","git_commits_url":"https://api.github.com/repos/knoxHuang/engine/git/commits{/sha}","comments_url":"https://api.github.com/repos/knoxHuang/engine/comments{/number}","issue_comment_url":"https://api.github.com/repos/knoxHuang/engine/issues/comments/{number}","contents_url":"https://api.github.com/repos/knoxHuang/engine/contents/{+path}","compare_url":"https://api.github.com/repos/knoxHuang/engine/compare/{base}...{head}","merges_url":"https://api.github.com/repos/knoxHuang/engine/merges","archive_url":"https://api.github.com/repos/knoxHuang/engine/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/knoxHuang/engine/downloads","issues_url":"https://api.github.com/repos/knoxHuang/engine/issues{/number}","pulls_url":"https://api.github.com/repos/knoxHuang/engine/pulls{/number}","milestones_url":"https://api.github.com/repos/knoxHuang/engine/milestones{/number}","notifications_url":"https://api.github.com/repos/knoxHuang/engine/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/knoxHuang/engine/labels{/name}","releases_url":"https://api.github.com/repos/knoxHuang/engine/releases{/id}","created_at":"2015-01-05T02:38:04Z","updated_at":"2015-02-03T08:13:06Z","pushed_at":"2015-02-04T06:27:06Z","git_url":"git://github.com/knoxHuang/engine.git","ssh_url":"git@github.com:knoxHuang/engine.git","clone_url":"https://github.com/knoxHuang/engine.git","svn_url":"https://github.com/knoxHuang/engine","homepage":null,"size":1079,"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":"fireball-x:master","ref":"master","sha":"d6696bae99b9c5ca21385b74deab72023918fa8e","user":{"login":"fireball-x","id":6937061,"avatar_url":"https://avatars.githubusercontent.com/u/6937061?v=3","gravatar_id":"","url":"https://api.github.com/users/fireball-x","html_url":"https://github.com/fireball-x","followers_url":"https://api.github.com/users/fireball-x/followers","following_url":"https://api.github.com/users/fireball-x/following{/other_user}","gists_url":"https://api.github.com/users/fireball-x/gists{/gist_id}","starred_url":"https://api.github.com/users/fireball-x/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fireball-x/subscriptions","organizations_url":"https://api.github.com/users/fireball-x/orgs","repos_url":"https://api.github.com/users/fireball-x/repos","events_url":"https://api.github.com/users/fireball-x/events{/privacy}","received_events_url":"https://api.github.com/users/fireball-x/received_events","type":"Organization","site_admin":false},"repo":{"id":19685533,"name":"engine","full_name":"fireball-x/engine","owner":{"login":"fireball-x","id":6937061,"avatar_url":"https://avatars.githubusercontent.com/u/6937061?v=3","gravatar_id":"","url":"https://api.github.com/users/fireball-x","html_url":"https://github.com/fireball-x","followers_url":"https://api.github.com/users/fireball-x/followers","following_url":"https://api.github.com/users/fireball-x/following{/other_user}","gists_url":"https://api.github.com/users/fireball-x/gists{/gist_id}","starred_url":"https://api.github.com/users/fireball-x/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fireball-x/subscriptions","organizations_url":"https://api.github.com/users/fireball-x/orgs","repos_url":"https://api.github.com/users/fireball-x/repos","events_url":"https://api.github.com/users/fireball-x/events{/privacy}","received_events_url":"https://api.github.com/users/fireball-x/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fireball-x/engine","description":"The fireball engine","fork":false,"url":"https://api.github.com/repos/fireball-x/engine","forks_url":"https://api.github.com/repos/fireball-x/engine/forks","keys_url":"https://api.github.com/repos/fireball-x/engine/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fireball-x/engine/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fireball-x/engine/teams","hooks_url":"https://api.github.com/repos/fireball-x/engine/hooks","issue_events_url":"https://api.github.com/repos/fireball-x/engine/issues/events{/number}","events_url":"https://api.github.com/repos/fireball-x/engine/events","assignees_url":"https://api.github.com/repos/fireball-x/engine/assignees{/user}","branches_url":"https://api.github.com/repos/fireball-x/engine/branches{/branch}","tags_url":"https://api.github.com/repos/fireball-x/engine/tags","blobs_url":"https://api.github.com/repos/fireball-x/engine/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fireball-x/engine/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fireball-x/engine/git/refs{/sha}","trees_url":"https://api.github.com/repos/fireball-x/engine/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fireball-x/engine/statuses/{sha}","languages_url":"https://api.github.com/repos/fireball-x/engine/languages","stargazers_url":"https://api.github.com/repos/fireball-x/engine/stargazers","contributors_url":"https://api.github.com/repos/fireball-x/engine/contributors","subscribers_url":"https://api.github.com/repos/fireball-x/engine/subscribers","subscription_url":"https://api.github.com/repos/fireball-x/engine/subscription","commits_url":"https://api.github.com/repos/fireball-x/engine/commits{/sha}","git_commits_url":"https://api.github.com/repos/fireball-x/engine/git/commits{/sha}","comments_url":"https://api.github.com/repos/fireball-x/engine/comments{/number}","issue_comment_url":"https://api.github.com/repos/fireball-x/engine/issues/comments/{number}","contents_url":"https://api.github.com/repos/fireball-x/engine/contents/{+path}","compare_url":"https://api.github.com/repos/fireball-x/engine/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fireball-x/engine/merges","archive_url":"https://api.github.com/repos/fireball-x/engine/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fireball-x/engine/downloads","issues_url":"https://api.github.com/repos/fireball-x/engine/issues{/number}","pulls_url":"https://api.github.com/repos/fireball-x/engine/pulls{/number}","milestones_url":"https://api.github.com/repos/fireball-x/engine/milestones{/number}","notifications_url":"https://api.github.com/repos/fireball-x/engine/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fireball-x/engine/labels{/name}","releases_url":"https://api.github.com/repos/fireball-x/engine/releases{/id}","created_at":"2014-05-12T04:10:28Z","updated_at":"2015-02-03T16:51:35Z","pushed_at":"2015-02-03T16:51:35Z","git_url":"git://github.com/fireball-x/engine.git","ssh_url":"git@github.com:fireball-x/engine.git","clone_url":"https://github.com/fireball-x/engine.git","svn_url":"https://github.com/fireball-x/engine","homepage":null,"size":2006,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":1,"forks":2,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fireball-x/engine/pulls/52"},"html":{"href":"https://github.com/fireball-x/engine/pull/52"},"issue":{"href":"https://api.github.com/repos/fireball-x/engine/issues/52"},"comments":{"href":"https://api.github.com/repos/fireball-x/engine/issues/52/comments"},"review_comments":{"href":"https://api.github.com/repos/fireball-x/engine/pulls/52/comments"},"review_comment":{"href":"https://api.github.com/repos/fireball-x/engine/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/fireball-x/engine/pulls/52/commits"},"statuses":{"href":"https://api.github.com/repos/fireball-x/engine/statuses/ad13f478ac5e24405d748ad19f3aa683452948e9"}}}}