Skip to content

Drag from outside element render lagging #544

Open
@comdet

Description

@comdet

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

Activity

oddjobz

oddjobz commented on Feb 1, 2021

@oddjobz

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

miguelsalameh commented on Sep 22, 2021

@miguelsalameh

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @comdet@oddjobz@miguelsalameh

      Issue actions

        Drag from outside element render lagging · Issue #544 · jbaysolutions/vue-grid-layout