From 055b4e7b4f2725936fc91ee3ecf831421f3fbc02 Mon Sep 17 00:00:00 2001 From: plainheart Date: Sun, 14 May 2023 18:19:29 +0800 Subject: [PATCH] fix(transform): fix `invTransform` may not be reset when updating transform. --- src/core/Transformable.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/core/Transformable.ts b/src/core/Transformable.ts index 0ab5ce796..470c89c24 100644 --- a/src/core/Transformable.ts +++ b/src/core/Transformable.ts @@ -108,7 +108,11 @@ class Transformable { let m = this.transform; if (!(needLocalTransform || parentTransform)) { - m && mIdentity(m); + if (m) { + mIdentity(m); + // reset invTransform + this.invTransform = null; + } return; }