WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 8ee21bd

Browse files
committed
update and refine props
1 parent d0369e8 commit 8ee21bd

File tree

3 files changed

+5
-11
lines changed

3 files changed

+5
-11
lines changed

src/templates/components/Fabric.svelte

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
export let showVideo = false;
4141
export let isXL = false;
4242
43-
const isMobile = window.innerWidth < 740;
43+
const isMobile = window.matchMedia('(max-width: 739px)').matches;
4444
const isTablet = window.matchMedia(
4545
'(min-width: 740px) and (max-width: 979px)',
4646
).matches;
@@ -61,8 +61,8 @@
6161
if (video) {
6262
if (!VideoURL || !VideoURLMobile) return;
6363
64-
video.load(); //
65-
void video.play(); //
64+
video.load();
65+
void video.play();
6666
6767
const observer = new IntersectionObserver(
6868
(entries) => {

src/templates/csr/fabric-video/index.svelte

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,6 @@
3434
export let MobileVideoBackupImage: GAMVariable;
3535
export let VideoURLMobile: GAMVariable;
3636
export let VideoAlignment: GAMVariable;
37-
38-
export let isXL = false;
39-
export let showVideo = true;
4037
</script>
4138

4239
<Fabric
@@ -68,6 +65,5 @@
6865
{MobileVideoBackupImage}
6966
{VideoURLMobile}
7067
{VideoAlignment}
71-
{isXL}
72-
{showVideo}
68+
showVideo={true}
7369
/>

src/templates/csr/fabric-xl/index.svelte

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@
2828
export let MobileLayer2BackgroundPosition: GAMVariable;
2929
export let MobileLayer3BackgroundImage: GAMVariable;
3030
export let MobileLayer3BackgroundPosition: GAMVariable;
31-
32-
export let isXL = true;
3331
</script>
3432

3533
<Fabric
@@ -56,5 +54,5 @@
5654
{MobileLayer2BackgroundPosition}
5755
{MobileLayer3BackgroundImage}
5856
{MobileLayer3BackgroundPosition}
59-
{isXL}
57+
isXL={true}
6058
/>

0 commit comments

Comments
 (0)