Differences

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

Link to this comparison view

Both sides previous revision Previous revision
start [2023/02/09 23:42] steve.wangstart [2023/02/10 00:06] (current) steve.wang
Line 705: Line 705:
 if (deviceType!='mobile'){ if (deviceType!='mobile'){
     window.addEventListener("resize", function(e){     window.addEventListener("resize", function(e){
-        console.log('options',deviceType!='mobile',deviceOrientation!='portrait' 
         if (window.innerWidth<window.innerHeight){         if (window.innerWidth<window.innerHeight){
             //document.location.reload()             //document.location.reload()
Line 1454: Line 1453:
     if ( Math.abs( xDiff ) > Math.abs( yDiff ) ) {/*most significant*/     if ( Math.abs( xDiff ) > Math.abs( yDiff ) ) {/*most significant*/
         if ( xDiff > 0 && swipeCooldown==false) {         if ( xDiff > 0 && swipeCooldown==false) {
 +            evt.preventDefault()
             console.log('swiped left')             console.log('swiped left')
             swipeCooldown=true             swipeCooldown=true
Line 1462: Line 1462:
         }          } 
         else if (swipeCooldown==false) {         else if (swipeCooldown==false) {
 +            evt.preventDefault()
             console.log('swiped right')             console.log('swiped right')
             swipeCooldown=true             swipeCooldown=true
Line 1471: Line 1472:
     } else {     } else {
         if ( yDiff > 0 ) {         if ( yDiff > 0 ) {
-            console.log('donw swipe') 
         } else {          } else { 
-            console.log('up swipe') 
         }                                                                          }                                                                 
     }     }
  • start.1676014978.txt.gz
  • Last modified: 2023/02/09 23:42
  • by steve.wang