浏览代码

The Minicard dragging scrolls now the board at screen outside

Martin Filser 3 年之前
父节点
当前提交
126c9ab853
共有 1 个文件被更改,包括 9 次插入0 次删除
  1. 9 0
      client/components/lists/list.js

+ 9 - 0
client/components/lists/list.js

@@ -129,6 +129,15 @@ BlazeComponent.extendComponent({
         { // scroll to the right
           boardCanvas.scrollLeft += 15;
         }
+        if (event.pageY > boardCanvas.offsetHeight - 10)
+        { // scroll to the bottom
+          boardCanvas.scrollTop += 15;
+        }
+        if (event.pageY < 10)
+        { // scroll to the top
+          boardCanvas.scrollTop -= 15;
+        }
+      },
       },
     });