From 92b13ed11d4e71a5db5009d45a720b134c569921 Mon Sep 17 00:00:00 2001 From: Han <1343841607@qq.com> Date: Thu, 15 Apr 2021 18:40:56 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=5FgetCmdPoints=E4=B8=AD=E7=9A=84cmds?= =?UTF-8?q?=E5=8F=AF=E8=83=BD=E6=98=AF=E7=A9=BA=E6=95=B0=E7=BB=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layaAir/laya/display/GraphicsBounds.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/layaAir/laya/display/GraphicsBounds.ts b/src/layaAir/laya/display/GraphicsBounds.ts index e48c093b51..a57aa7a021 100644 --- a/src/layaAir/laya/display/GraphicsBounds.ts +++ b/src/layaAir/laya/display/GraphicsBounds.ts @@ -117,12 +117,12 @@ export class GraphicsBounds { rst = this._temp || (this._temp = []); rst.length = 0; - if (!cmds && this._graphics._one != null) { + if ((!cmds || cmds.length == 0) && this._graphics._one != null) { GraphicsBounds._tempCmds.length = 0; GraphicsBounds._tempCmds.push(this._graphics._one); cmds = GraphicsBounds._tempCmds; } - if (!cmds) return rst; + if (!cmds || cmds.length == 0) return rst; var matrixs: any[] = GraphicsBounds._tempMatrixArrays; matrixs.length = 0; @@ -420,4 +420,4 @@ export class GraphicsBounds { } return rst; } -} \ No newline at end of file +}