Skip to content

Commit 6adee33

Browse files
committed
Fix ProgressTimer vertex not updating when transform changing
1 parent 65eaf27 commit 6adee33

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Diff for: cocos2d/progress-timer/CCProgressTimerWebGLRenderCmd.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535

3636
this._bl = cc.p();
3737
this._tr = cc.p();
38+
this._transformUpdating = false;
3839

3940
this.initCmd();
4041
};
@@ -55,7 +56,9 @@
5556
this._tr.x = rx * wt.a + ty * wt.c + wt.tx;
5657
this._tr.y = rx * wt.b + ty * wt.d + wt.ty;
5758

59+
this._transformUpdating = true;
5860
this._updateProgressData();
61+
this._transformUpdating = false;
5962
};
6063

6164
proto.rendering = function (ctx) {
@@ -449,7 +452,7 @@
449452
this._updateColor();
450453

451454
var locVertexData = this._vertexData;
452-
if (!sameIndexCount) {
455+
if (this._transformUpdating || !sameIndexCount) {
453456
// First we populate the array with the m_tMidpoint, then all
454457
// vertices/texcoords/colors of the 12 'o clock start and edges and the hitpoint
455458
this._textureCoordFromAlphaPoint(locVertexData[0].texCoords, locMidPoint.x, locMidPoint.y);

0 commit comments

Comments
 (0)