From 05624e7f28ddfda21074bf99ac70befb91d7c37b Mon Sep 17 00:00:00 2001 From: 2youyouo2 <501251991@qq.com> Date: Mon, 1 Aug 2016 16:52:59 +0800 Subject: [PATCH] fixed graphics canvas commands --- cocos2d/core/graphics/graphics-canvas-cmd.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cocos2d/core/graphics/graphics-canvas-cmd.js b/cocos2d/core/graphics/graphics-canvas-cmd.js index 311731717d..2236def510 100644 --- a/cocos2d/core/graphics/graphics-canvas-cmd.js +++ b/cocos2d/core/graphics/graphics-canvas-cmd.js @@ -70,7 +70,8 @@ _p.rendering = function (ctx, scaleX, scaleY) { if (ctxCmd === 'clear') { cmds.splice(0, i+1); i = 0; - return; + l = cmds.length; + continue; } else if (ctxCmd === 'moveTo' && endPath) { context.beginPath();