From b6e8c8c8bfbb0797651456a1fa3677a13836a652 Mon Sep 17 00:00:00 2001 From: James Chen Date: Tue, 22 Oct 2024 11:01:10 +0800 Subject: [PATCH] [v3.8.5] Fix visiting private properties in jsb-editbox.js (#17749) --- platforms/native/engine/jsb-editbox.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/platforms/native/engine/jsb-editbox.js b/platforms/native/engine/jsb-editbox.js index 69514e56aa5..75e57f5d06b 100644 --- a/platforms/native/engine/jsb-editbox.js +++ b/platforms/native/engine/jsb-editbox.js @@ -169,8 +169,8 @@ _getRect () { const node = this._delegate.node; - let viewScaleX = cc.view._scaleX; - let viewScaleY = cc.view._scaleY; + let viewScaleX = cc.view.getScaleX(); + let viewScaleY = cc.view.getScaleY(); const dpr = jsb.device.getDevicePixelRatio() || 1; node.getWorldMatrix(worldMat); @@ -197,7 +197,7 @@ const finalScaleX = worldMat.m00 * viewScaleX; const finaleScaleY = worldMat.m05 * viewScaleY; - const viewportRect = cc.view._viewportRect; + const viewportRect = cc.view.getViewportRect(); const offsetX = viewportRect.x / dpr; const offsetY = viewportRect.y / dpr; return {