vue-grid-layout icon indicating copy to clipboard operation
vue-grid-layout copied to clipboard

Drag from outside element render lagging

Open comdet opened this issue 4 years ago • 2 comments

Hi, I use Vue-Grid-Layout in my project and found the drag from outsize element shadow box display lagging, and this behavior even worse in slow browser or slow PC. The won't happen when dragging element inside grid layout, only for outsize element.

I use this example : https://jbaysolutions.github.io/vue-grid-layout/guide/10-drag-from-outside.html

comdet avatar Jan 20 '21 07:01 comdet

I've had this too .. problem seems to be this, if you're working from the example;

document.addEventListener("dragover", function (e) {
            mouseXY.x = e.clientX;
            mouseXY.y = e.clientY;
        }, false);

Not sure specifically why, but if I replace this with;

document.onmousemove = function (event) {
    this.onDragOver(event)
}.bind(this);

.. obviously I need to adapt things a little, but this provides a better solution .. replacing Vue's built-in drag handler with "vue-smooth-dnd" now yields a very smooth / performant solution.

oddjobz avatar Feb 01 '21 13:02 oddjobz

Any updates on this one ? we're having the same problem and its freezing the browser after multiple drops

miguelsalameh avatar Sep 22 '21 16:09 miguelsalameh