Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drag from outside element render lagging #544

Open
comdet opened this issue Jan 20, 2021 · 2 comments · May be fixed by #707
Open

Drag from outside element render lagging #544

comdet opened this issue Jan 20, 2021 · 2 comments · May be fixed by #707

Comments

@comdet
Copy link

comdet commented Jan 20, 2021

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

@oddjobz
Copy link

oddjobz commented Feb 1, 2021

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.

@miguelsalameh
Copy link

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

@jledentu jledentu linked a pull request Sep 3, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants