Browse Source

Добавил вкл-выкл скроллинга на среднюю кнопку мыши

Book Pauk 6 years ago
parent
commit
2390860954

+ 1 - 0
client/components/Reader/Reader.vue

@@ -54,6 +54,7 @@
                     @tool-bar-toggle="toolBarToggle"
                     @full-screen-toogle="fullScreenToggle"
                     @stop-scrolling="stopScrolling"
+                    @scrolling-toggle="scrollingToggle"
                 ></component>
             </keep-alive>
 

+ 3 - 1
client/components/Reader/TextPage/TextPage.vue

@@ -553,7 +553,7 @@ class TextPage extends Vue {
         len = (len > this.pageLineCount + 1 ? this.pageLineCount + 1 : len);
 
         let y = this.fontSize*this.textShift;
-        
+
         for (let i = 0; i < len; i++) {
             const line = lines[i];
             /* line:
@@ -886,6 +886,8 @@ class TextPage extends Vue {
                 this.repDoing = true;
                 this.debouncedStartClickRepeat(event.offsetX, event.offsetY);
             }
+        } else if (event.button == 1) {
+            this.$emit('scrolling-toggle');
         } else if (event.button == 2) {
             this.doToolBarToggle();
         }