fix(cursor): address review findings — aria-label, 3D transform sync, i18n

- 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
This commit is contained in:
auberginewly
2026-05-18 17:59:55 +08:00
committed by Etienne Lescot
parent 58722a1d84
commit 8516707880
4 changed files with 9 additions and 2 deletions
@@ -1426,6 +1426,7 @@ export function SettingsPanel({
checked={cursorClipToBounds}
onCheckedChange={onCursorClipToBoundsChange}
className="data-[state=checked]:bg-[#34B27B] scale-90"
aria-label={t("cursor.clipToBounds")}
/>
</div>
<div className="grid grid-cols-2 gap-2">
@@ -1634,6 +1634,9 @@ const VideoPlayback = forwardRef<VideoPlaybackRef, VideoPlaybackProps>(
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<VideoPlaybackRef, VideoPlaybackProps>(
);
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`;