Browse Source

Merge branch 'master' of http://192.168.0.115:3000/chenzhiguang/new_era

tremble 3 years ago
parent
commit
dfd0155241
1 changed files with 51 additions and 9 deletions
  1. 51 9
      public/static/js/main_2020_show.js

+ 51 - 9
public/static/js/main_2020_show.js

@@ -7585,6 +7585,31 @@ window.Modernizr = function (n, e, t) {
                             $("#progressBar").find("[data-idx='" + i + "']").addClass("active")
                     }),
                     w()
+                    
+                    
+                    //add : 
+                
+                    let scrollFrame = $(W.frame)
+                    scrollFrame.on("wheel.sly", function() {
+                         lastMoveScrollTime = Date.now()
+                    })
+                    
+                    let dragstart 
+                    scrollFrame.on("pointerdown",  function() { 
+                        dragstart = true
+                    })
+                    scrollFrame.on("pointerup",  function() {
+                        dragstart = false
+                    })
+                    scrollFrame.on("pointermove",  function() {
+                        if(dragstart){
+                            lastMoveScrollTime = Date.now()
+                        }
+                    })
+                    
+                    
+                    
+                    
             }
             function w() {
                 var e = $("#player").width() - 20
@@ -7762,16 +7787,30 @@ window.Modernizr = function (n, e, t) {
                                 f = "recent") : (f = "active",
                                     p = "recent");
                         var g = null === n.destinationItem || n.currentItem[0] === n.destinationItem[0];
-                        for (r = 0; r < e.heroLocations.length; r += 1)
+                        for (r = 0; r < e.heroLocations.length; r += 1){
                             s = y.eq(r),
-                                a = I.eq(r),
-                                s.removeClass(f),
-                                a.removeClass(f),
-                                n.onTheBus && r === n.destinationItem[0] ? (s.addClass(p),
-                                    a.addClass(p),
-                                    W.activate(r)) : n.onTheBus && g && r === n.currentItem[0] ? (s.addClass(p),
-                                        a.addClass(p)) : (s.removeClass(p),
-                                            a.removeClass(p))
+                            a = I.eq(r),
+                            s.removeClass(f),
+                            a.removeClass(f);
+                            
+                            if(n.onTheBus && r === n.destinationItem[0]){
+                                s.addClass(p) 
+                                a.addClass(p) 
+                                if(Date.now() - lastMoveScrollTime > 2000){ //add
+                                    W.activate(r) // scrollbar slide to this
+                                }
+                                
+                                
+                                
+                            }else{
+                                n.onTheBus && g && r === n.currentItem[0] ? 
+                                (s.addClass(p), a.addClass(p)) : 
+                                (s.removeClass(p),  a.removeClass(p))  
+                                
+                            }  
+                        }    
+                            
+                                            
                     } else
                         for (r = 0; r < e.heroLocations.length; r += 1)
                             s = y.eq(r),
@@ -8047,6 +8086,9 @@ window.Modernizr = function (n, e, t) {
                             "A" === e.target.nodeName && e.preventDefault())
                     }, !0)
             }
+            
+            var lastMoveScrollTime = 0;//add
+            
             var W, j, Y, X, Z, q, K = (e("three"),
                 e("../util/ajax"),
                 e("../util/browser")), Q = e("../settings"), J = e("../analytics"), ee = (e("../util/transitions"),