Skip to content

Commit 43c08b2

Browse files
committed
'additionalTransform' correct processing
1 parent e102082 commit 43c08b2

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

Diff for: cocos2d/core/base-nodes/CCNodeCanvasRenderCmd.js

+8-4
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,10 @@ cc.Node.RenderCmd.prototype = {
194194
}
195195
}
196196

197+
if (node._additionalTransformDirty) {
198+
this._transform = t = cc.affineTransformConcat(t, node._additionalTransform); // seems like 'this._transform' can be removed
199+
}
200+
197201
if (pt) {
198202
// cc.AffineTransformConcat is incorrect at get world transform
199203
wt.a = t.a * pt.a + t.b * pt.c; //a
@@ -229,6 +233,10 @@ cc.Node.RenderCmd.prototype = {
229233
}
230234
}
231235

236+
if (node._additionalTransformDirty) {
237+
this._transform = t = cc.affineTransformConcat(t, node._additionalTransform);
238+
}
239+
232240
if (pt) {
233241
wt.a = t.a * pt.a + t.b * pt.c;
234242
wt.b = t.a * pt.b + t.b * pt.d;
@@ -246,10 +254,6 @@ cc.Node.RenderCmd.prototype = {
246254
}
247255
}
248256

249-
if (node._additionalTransformDirty) {
250-
this._transform = cc.affineTransformConcat(t, node._additionalTransform);
251-
}
252-
253257
this._updateCurrentRegions && this._updateCurrentRegions();
254258
this._notifyRegionStatus && this._notifyRegionStatus(cc.Node.CanvasRenderCmd.RegionStatus.DirtyDouble);
255259

0 commit comments

Comments
 (0)