fix: 首屏转场不再因减少动效偏好被直接跳过
This commit is contained in:
1 parent
d6da152dec
commit
dfa9f311e0
1 file changed
-4
@@ -11,10 +11,6 @@ export function HeroTransition({ data, onDone }) {
|
||||
if (!data) return undefined;
|
||||
const node = ref.current;
|
||||
if (!node) return undefined;
|
||||
if (window.matchMedia?.('(prefers-reduced-motion: reduce)').matches) {
|
||||
onDone();
|
||||
return undefined;
|
||||
}
|
||||
const rect = data;
|
||||
const scale = Math.max(window.innerWidth / rect.width, window.innerHeight / rect.height) * 1.04;
|
||||
const tx = (window.innerWidth - rect.width * scale) / 2 - rect.left;
|
||||
|
||||
Reference in new issue
Block a user