phphe / vue-draggable-nested-tree

Vue2 draggable tree component
https://hetree.phphe.com/
MIT License
345 stars 62 forks source link

large trees : dragging problem #42

Open smilingkite opened 5 years ago

smilingkite commented 5 years ago

In large trees I see dragging problems when the tree is not collapsed.

smilingkite commented 5 years ago

The problem appears to be solved if in Tree.vue you define your space prop with a type 'number':

space: {type: Number, default: 10},

Right now in autodragplaceholder.js, in line 258:

const ty2 = ty + el.offsetHeight + currentTree.space

appends currentTree.space to the rest instead of adding it. The result is a string.

For instance: ty: 1137, offsetHeight: 57, space: "5", ty2: "11945" instead of ty2: 1199

phphe commented 5 years ago

fixed in 2.1.8