Просмотр исходного кода

feat:自动导览时关闭导航栏

aamin 1 год назад
Родитель
Сommit
a9707874b4

+ 3 - 2
scene/public/static/css/main.css

@@ -4374,6 +4374,7 @@ a.tag-link {
     align-items: center;
     cursor: pointer;
     margin-right: 8px;
+    margin-bottom: 1px;
 }
 
 .tourSpinner {
@@ -7893,13 +7894,13 @@ a.hasHover.tag-link:hover {
     #pause {
         width: 60px;
         padding-bottom: 10px;
-        margin-bottom: 15px;
+        margin-bottom: 10px;
     }
 
     #gui-modes-map>div[rel] {
         width: 60px;
         padding-bottom: 10px;
-        margin-bottom: 15px;
+        margin-bottom: 10px;
     }
 
     .progressbar {

+ 26 - 1
scene/public/static/js/main_2020_show.js

@@ -6530,6 +6530,31 @@ window.Modernizr = function(n, e, t) {
                         gui_action: "play_highlights"
                     })
                     console.log('开始了')
+
+                    // 开始导航,关闭导航栏,鼠标移动时,开启导航栏
+                    // const pinBottomDom = document.querySelector('.duringTour')
+                    // console.log(pinBottomDom)
+                    $('.pinBottom-container').hide()
+                    // PC端
+                    document.body.addEventListener('mousemove', () => {
+                        $('.pinBottom-container').show()
+                        document.body.removeEventListener('mousemove',() => {
+                            $('.pinBottom-container').show()
+                        })
+                    })
+                    // 移动端
+                    document.body.addEventListener('touchmove', () => {
+                        $('.pinBottom-container').show()
+                        document.body.removeEventListener('touchmove',() => {
+                            $('.pinBottom-container').show()
+                        })
+                    })
+                    document.body.addEventListener('touchstart', () => {
+                        $('.pinBottom-container').show()
+                        document.body.removeEventListener('touchstart',() => {
+                            $('.pinBottom-container').show()
+                        })
+                    })
                     $('#leftInfo').hide()
                 }),
                 window.startAndPlay = function(e) {
@@ -6547,7 +6572,7 @@ window.Modernizr = function(n, e, t) {
                         gui_action: "pause_highlights"
                     })
                     console.log('暂停了')
-                    $('#leftInfo').show()
+                    window.innerWidth > 768 ? $('#leftInfo').show() :''
 
                 }),
                 $("#gui-zoomin").find("a").on("click", function(e) {

+ 1 - 1
scene/src/views/gui/menu.vue

@@ -819,7 +819,7 @@ export default {
           width: 50px;
           text-align: right;
           margin-right: 0;
-          margin-bottom: 20px;
+          margin-bottom: 10px;
 
           &>div {
             display: flex;