Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
steve-image-carosel-test-page3 [2023/02/09 06:36] steve.wangsteve-image-carosel-test-page3 [2023/02/09 06:44] (current) steve.wang
Line 685: Line 685:
     }))     }))
 } }
-window.addEventListener("resize", function(e){ + 
-    console.log('options',deviceType!='mobile',deviceOrientation!='portrait')  +if (deviceTyp!='mobile'){ 
-    if (window.innerWidth<window.innerHeight){ +    window.addEventListener("resize", function(e){ 
-        //document.location.reload() +        console.log('options',deviceType!='mobile',deviceOrientation!='portrait')  
-            console.log('Resize detected: portrait mode'+        if (window.innerWidth<window.innerHeight){ 
-        if (deviceType!='mobile' ){ +            //document.location.reload() 
-            deviceOrientation='portrait+                console.log('Resize detected: portrait mode'
-            higs.sequenceActions('quickRight'+                deviceOrientation='portrait' 
-            setTimeout(()=>+                higs.sequenceActions('quickRight'
-                higs.carosel.style.height=higs.centeredImg.getBoundingClientRect().height+'px' +                setTimeout(()=>{ 
-            },200)+                    higs.carosel.style.height=higs.centeredImg.getBoundingClientRect().height+'px' 
 +                },300) 
 +            } 
 +            //adaptToOrientationChange() 
 +        else{  
 +            //document.location.reload() 
 +            console.log('Resize detected: landscape mode'
 +                deviceOrientation='landscape
 +                higs.sequenceActions('quickRight'
 +               setTimeout(()=>
 +                    higs.carosel.style.height=higs.centeredImg.getBoundingClientRect().height+'px' 
 +                },200
 +            //adaptToOrientationChange()
         }         }
-        else if (deviceOrientation=='landscape'){ +    }) 
-            deviceOrientation='portrait' +}
-            higs.sequenceActions('quickRight'+
-            setTimeout(()=>+
-                higs.carosel.style.height=higs.centeredImg.getBoundingClientRect().height+'px' +
-            },200+
-        } +
-        //adaptToOrientationChange() +
-    } +
-    else{  +
-        //document.location.reload() +
- console.log('Resize detected: landscape mode'+
-        if (deviceType!='mobile' ){ +
-            deviceOrientation='landscape' +
-            higs.sequenceActions('quickRight'+
-           setTimeout(()=>+
-                higs.carosel.style.height=higs.centeredImg.getBoundingClientRect().height+'px' +
-            },200) +
-        } +
-        else if (deviceOrientation == 'portrait'){ +
-            deviceOrientation='landscape' +
-            higs.sequenceActions('quickRight'+
-           setTimeout(()=>+
-                higs.carosel.style.height=higs.centeredImg.getBoundingClientRect().height+'px' +
-            },200) +
-        } +
-        //adaptToOrientationChange() +
-    } +
-})+
  
 /* /*
  • steve-image-carosel-test-page3.1675953383.txt.gz
  • Last modified: 2023/02/09 06:36
  • by steve.wang