Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
steve-image-carosel-test-page3 [2023/02/09 06:34] – steve.wang | steve-image-carosel-test-page3 [2023/02/09 06:44] (current) – steve.wang | ||
---|---|---|---|
Line 128: | Line 128: | ||
let info=[{ | let info=[{ | ||
imageSrc:' | imageSrc:' | ||
- | | + | |
href:' | href:' | ||
description:' | description:' | ||
},{ | },{ | ||
imageSrc:' | imageSrc:' | ||
- | | + | |
href:' | href:' | ||
description:' | description:' | ||
},{ | },{ | ||
imageSrc:' | imageSrc:' | ||
- | | + | |
href:' | href:' | ||
description:' | description:' | ||
Line 146: | Line 146: | ||
let info=[{ | let info=[{ | ||
imageSrc:' | imageSrc:' | ||
- | | + | |
href:' | href:' | ||
description:' | description:' | ||
},{ | },{ | ||
imageSrc:' | imageSrc:' | ||
- | | + | |
href:' | href:' | ||
description:' | description:' | ||
},{ | },{ | ||
imageSrc:' | imageSrc:' | ||
- | | + | |
href:' | href:' | ||
description:' | description:' | ||
},{ | },{ | ||
imageSrc:' | imageSrc:' | ||
- | | + | |
href:' | href:' | ||
description:' | description:' | ||
},{ | },{ | ||
imageSrc:' | imageSrc:' | ||
- | | + | |
href:' | href:' | ||
description:' | description:' | ||
Line 226: | Line 226: | ||
} | } | ||
else{ | else{ | ||
- | this.mainImg1.href=this.info[1].portriatSrc | + | this.mainImg1.href=this.info[1].portraitSrc |
} | } | ||
this.mainImg1.className=' | this.mainImg1.className=' | ||
Line 235: | Line 235: | ||
} | } | ||
else{ | else{ | ||
- | this.mainImg2.src=this.info[0].portriatSrc | + | this.mainImg2.src=this.info[0].portraitSrc |
} | } | ||
this.mainImg2.className=' | this.mainImg2.className=' | ||
Line 284: | Line 284: | ||
arrowSizes=100 | arrowSizes=100 | ||
} | } | ||
- | else if (deviceOrientation==' | + | else if (deviceOrientation==' |
console.log(' | console.log(' | ||
arrowSizes=browserZoomLevel/ | arrowSizes=browserZoomLevel/ | ||
Line 498: | Line 498: | ||
} | } | ||
else{ | else{ | ||
- | toChangeTo.src=this.info[this.currentImage].portriatSrc | + | toChangeTo.src=this.info[this.currentImage].portraitSrc |
} | } | ||
} | } | ||
Line 577: | Line 577: | ||
| | ||
if (window.innerWidth< | if (window.innerWidth< | ||
- | console.log(' | + | console.log(' |
- | deviceOrientation=' | + | deviceOrientation=' |
} | } | ||
else{ | else{ | ||
Line 685: | Line 685: | ||
})) | })) | ||
} | } | ||
- | window.addEventListener(" | + | |
- | console.log(' | + | if (deviceTyp!=' |
- | if (window.innerWidth< | + | |
- | // | + | console.log(' |
- | console.log(' | + | if (window.innerWidth< |
- | | + | // |
- | deviceOrientation=' | + | console.log(' |
- | higs.sequenceActions(' | + | |
- | setTimeout(()=> | + | higs.sequenceActions(' |
- | higs.carosel.style.height=higs.centeredImg.getBoundingClientRect().height+' | + | setTimeout(()=>{ |
- | },200) | + | higs.carosel.style.height=higs.centeredImg.getBoundingClientRect().height+'px' |
+ | },300) | ||
+ | } | ||
+ | // | ||
+ | else{ | ||
+ | | ||
+ | console.log(' | ||
+ | | ||
+ | higs.sequenceActions(' | ||
+ | | ||
+ | higs.carosel.style.height=higs.centeredImg.getBoundingClientRect().height+' | ||
+ | },200) | ||
+ | // | ||
} | } | ||
- | else if (deviceOrientation==' | + | |
- | deviceOrientation=' | + | } |
- | higs.sequenceActions(' | + | |
- | setTimeout(()=> | + | |
- | higs.carosel.style.height=higs.centeredImg.getBoundingClientRect().height+' | + | |
- | | + | |
- | } | + | |
- | // | + | |
- | } | + | |
- | else{ | + | |
- | // | + | |
- | console.log(' | + | |
- | if (deviceType!=' | + | |
- | deviceOrientation=' | + | |
- | higs.sequenceActions(' | + | |
- | | + | |
- | higs.carosel.style.height=higs.centeredImg.getBoundingClientRect().height+' | + | |
- | },200) | + | |
- | } | + | |
- | else if (deviceOrientation == ' | + | |
- | deviceOrientation=' | + | |
- | higs.sequenceActions(' | + | |
- | | + | |
- | higs.carosel.style.height=higs.centeredImg.getBoundingClientRect().height+' | + | |
- | },200) | + | |
- | } | + | |
- | // | + | |
- | } | + | |
- | }) | + | |
/* | /* |