holiber / sl-vue-tree

Customizable draggable tree component for Vue.js
MIT License
344 stars 79 forks source link

fixes scrolling issues #27

Closed lazylester closed 5 years ago

lazylester commented 5 years ago

When dragging within a list that is longer than the height of the page, we would the page to scroll when we drag towards the bottom or top of the list, so we can insert the dragged nodes at points that are not initially within the viewport.

There appears to have been some attempt to implement this, but it was not working. This PR fixes that.

lazylester commented 5 years ago

Hello @holiber, I was surprised to see the 'enhancement' designation for this PR. Of course it's entirely your prerogative, but it seems like a bug to me, because:

  1. for long lists, it is impossible to drag/drop a node onto another node that is off the page, as page scrolling is not being triggered
  2. the code contains some lines that appear to implement the scrolling described in 1, but this code was not working I just wanted to let you know this rationale in case it wasn't clear in my PR. Thanks for Sl-Vue-Tree btw!