瀏覽代碼

Dragscroll possible, scroll the screen with the mouse at desktop view

- click on a empty list area and drag the view left/right to scroll
Martin Filser 2 年之前
父節點
當前提交
c76959ff25

+ 2 - 2
.devcontainer/Dockerfile

@@ -8,8 +8,8 @@ LABEL org.opencontainers.image.source="https://github.com/wekan/wekan"
 # - gyp does not yet work with Ubuntu 22.04 ubuntu:rolling,
 #   so changing to 21.10. https://github.com/wekan/wekan/issues/4488
 
-ENV BUILD_DEPS="apt-utils gnupg gosu wget bzip2 g++ iproute2 apt-transport-https libarchive-tools git"
-ENV DEV_DEPS="curl python3 ca-certificates build-essential"
+ENV BUILD_DEPS="apt-utils gnupg gosu wget bzip2 g++ iproute2 apt-transport-https libarchive-tools"
+ENV DEV_DEPS="curl python3 ca-certificates build-essential git"
 ARG DEBIAN_FRONTEND=noninteractive
 
 ENV \

+ 1 - 1
client/components/boards/boardBody.jade

@@ -18,7 +18,7 @@ template(name="boardBody")
   else
     .board-wrapper(class=currentBoard.colorClass)
       +sidebar
-      .board-canvas.js-swimlanes(
+      .board-canvas.js-swimlanes.dragscroll(
         class="{{#if Sidebar.isOpen}}is-sibling-sidebar-open{{/if}}"
         class="{{#if MultiSelection.isActive}}is-multiselection-active{{/if}}"
         class="{{#if draggingActive.get}}is-dragging-active{{/if}}")

+ 2 - 0
client/components/boards/boardBody.js

@@ -1,5 +1,6 @@
 import { ReactiveCache } from '/imports/reactiveCache';
 import { TAPi18n } from '/imports/i18n';
+import dragscroll from 'dragscroll';
 
 const subManager = new SubsManager();
 const { calculateIndex } = Utils;
@@ -219,6 +220,7 @@ BlazeComponent.extendComponent({
       boardComponent.openNewListForm();
     }
 
+    dragscroll.reset();
     Utils.setBackgroundImage();
   },
 

+ 1 - 1
client/components/cards/minicard.jade

@@ -1,5 +1,5 @@
 template(name="minicard")
-  .minicard(
+  .minicard.nodragscroll(
     class="{{#if isLinkedCard}}linked-card{{/if}}"
     class="{{#if isLinkedBoard}}linked-board{{/if}}"
     class="{{#if colorClass}}minicard-{{colorClass}}{{/if}}")

+ 1 - 1
client/components/lists/listHeader.jade

@@ -1,5 +1,5 @@
 template(name="listHeader")
-  .list-header.js-list-header(
+  .list-header.js-list-header.nodragscroll(
     class="{{#if limitToShowCardsCount}}list-header-card-count{{/if}}"
     class=colorClass)
     +inlinedForm

+ 4 - 0
package-lock.json

@@ -681,6 +681,10 @@
         "domhandler": "^4.2.0"
       }
     },
+    "dragscroll": {
+      "version": "git+https://github.com/mfilser/dragscroll.git#992943a9a8477d745f7092f99ae32375a6654124",
+      "from": "git+https://github.com/mfilser/dragscroll.git#992943a9a8477d745f7092f99ae32375a6654124"
+    },
     "duplexer2": {
       "version": "0.1.4",
       "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz",

+ 1 - 0
package.json

@@ -28,6 +28,7 @@
     "bcryptjs": "^2.4.3",
     "bson": "^4.5.2",
     "dompurify": "^2.5.5",
+    "dragscroll": "git+https://github.com/mfilser/dragscroll.git#992943a9a8477d745f7092f99ae32375a6654124",
     "es6-promise": "^4.2.4",
     "escape-string-regexp": "^5.0.0",
     "fibers": "^5.0.3",