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:
committed by
Etienne Lescot
parent
58722a1d84
commit
8516707880
@@ -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`;
|
||||
|
||||
@@ -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"
|
||||
},
|
||||
|
||||
@@ -196,7 +196,7 @@
|
||||
"show": "顯示游標",
|
||||
"size": "大小",
|
||||
"smoothing": "平滑",
|
||||
"motionBlur": "運動模糊",
|
||||
"motionBlur": "動態模糊",
|
||||
"clickBounce": "點擊彈跳",
|
||||
"clipToBounds": "裁切至畫布"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user