From 8516707880e4b042b41d03618fb2ecbfe7e03f73 Mon Sep 17 00:00:00 2001
From: auberginewly <3127221787@qq.com>
Date: Mon, 18 May 2026 17:59:55 +0800
Subject: [PATCH] =?UTF-8?q?fix(cursor):=20address=20review=20findings=20?=
=?UTF-8?q?=E2=80=94=20aria-label,=203D=20transform=20sync,=20i18n?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- Add aria-label to cursorClipToBounds Switch so screen readers announce the control
- Mirror composite3D 3D transform onto nativeCursorClipRef so the cursor clip layer
rotates with the video during 3D zoom regions (cursor stays outside preserve-3d
so clip-path continues to work; only the transform string is mirrored)
- Fix vi cursor.motionBlur: "Mờ chuyển động" → "Làm mờ chuyển động" to match
effects.motionBlur phrasing
- Fix zh-TW cursor.motionBlur: "運動模糊" → "動態模糊" to match effects.motionBlur
---
src/components/video-editor/SettingsPanel.tsx | 1 +
src/components/video-editor/VideoPlayback.tsx | 6 ++++++
src/i18n/locales/vi/settings.json | 2 +-
src/i18n/locales/zh-TW/settings.json | 2 +-
4 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/src/components/video-editor/SettingsPanel.tsx b/src/components/video-editor/SettingsPanel.tsx
index 2b15c24..5339fcc 100644
--- a/src/components/video-editor/SettingsPanel.tsx
+++ b/src/components/video-editor/SettingsPanel.tsx
@@ -1426,6 +1426,7 @@ export function SettingsPanel({
checked={cursorClipToBounds}
onCheckedChange={onCursorClipToBoundsChange}
className="data-[state=checked]:bg-[#34B27B] scale-90"
+ aria-label={t("cursor.clipToBounds")}
/>
diff --git a/src/components/video-editor/VideoPlayback.tsx b/src/components/video-editor/VideoPlayback.tsx
index 6a4f2f3..9f4f34b 100644
--- a/src/components/video-editor/VideoPlayback.tsx
+++ b/src/components/video-editor/VideoPlayback.tsx
@@ -1634,6 +1634,9 @@ const VideoPlayback = forwardRef(
composite3D.style.willChange = "auto";
lastTransformIsIdentity = true;
}
+ if (nativeCursorClipRef.current) {
+ nativeCursorClipRef.current.style.transform = "";
+ }
if (lastPerspectiveValue !== 0) {
outerWrapper.style.perspective = "";
lastPerspectiveValue = 0;
@@ -1650,6 +1653,9 @@ const VideoPlayback = forwardRef(
);
composite3D.style.transform = `scale(${containScale}) rotateX(${effectiveRotation.rotationX}deg) rotateY(${effectiveRotation.rotationY}deg) rotateZ(${effectiveRotation.rotationZ}deg)`;
composite3D.style.willChange = "transform";
+ if (nativeCursorClipRef.current) {
+ nativeCursorClipRef.current.style.transform = composite3D.style.transform;
+ }
lastTransformIsIdentity = false;
if (persp !== lastPerspectiveValue) {
outerWrapper.style.perspective = `${persp}px`;
diff --git a/src/i18n/locales/vi/settings.json b/src/i18n/locales/vi/settings.json
index bc598bf..8449762 100644
--- a/src/i18n/locales/vi/settings.json
+++ b/src/i18n/locales/vi/settings.json
@@ -195,7 +195,7 @@
"show": "Hiện con trỏ",
"size": "Kích thước",
"smoothing": "Làm mượt",
- "motionBlur": "Mờ chuyển động",
+ "motionBlur": "Làm mờ chuyển động",
"clickBounce": "Nảy khi nhấp",
"clipToBounds": "Cắt theo khung"
},
diff --git a/src/i18n/locales/zh-TW/settings.json b/src/i18n/locales/zh-TW/settings.json
index d8e8fca..100c756 100644
--- a/src/i18n/locales/zh-TW/settings.json
+++ b/src/i18n/locales/zh-TW/settings.json
@@ -196,7 +196,7 @@
"show": "顯示游標",
"size": "大小",
"smoothing": "平滑",
- "motionBlur": "運動模糊",
+ "motionBlur": "動態模糊",
"clickBounce": "點擊彈跳",
"clipToBounds": "裁切至畫布"
},