Skip to content

Clone node on drop #396

Closed
Closed

Description

@notbear

I'm trying to make an application where items can be copied from the palette to the canvas. For now gridpack supports only moving between grids. I hoped that it would be enough to remove line 785 from v0.2.5 which removes the source of element, but it leads to undesired behaviors when I try to copy the element from palette into canvas two or more times.

Example: http://codepen.io/NotBear/pen/EKyYqB/

Please advice

Activity

  1. troolee commented on Mar 10, 2016

    @troolee
    Member

    Try to unbind all events handlers and data attributes of cloned item

  2. notbear commented on Mar 10, 2016

    @notbear
    Author

    Thanks, I will try and let you know.

  3. kertonandrew commented on May 1, 2016

    @kertonandrew

    Did you find a solution to the problem?

    Edit: I'm cloning widgets from a palette similar to your example. After dropping a widget in my gridstack container the next widget I grab from the palette triggers an "out" event although it has never entered the droppable area. This occurs in your example too. I'm a bit of a js noob so not exactly sure why these events are occuring. Would greatly appreciate any pointers, I'll post my solution once I figure it out.

  4. notbear commented on May 3, 2016

    @notbear
    Author

    @attractivePoop I'm sorry, but not. My team resigned from gridstack due to changed requirements.

  5. kertonandrew commented on May 4, 2016

    @kertonandrew

    Thank you for the response.

  6. mcelligottnick commented on May 5, 2016

    @mcelligottnick
  7. redstubble commented on Aug 16, 2016

    @redstubble

    @troolee I am hitting this same issue. I have tried to unbind all attributes and events to no avail can you provide a snippet to point me in the right direction.

  8. added this to the v0.3.0 milestone on Aug 17, 2016
  9. modified the milestones: v0.2.7, v0.3.0 on Aug 17, 2016
  10. radiolips commented on Aug 17, 2016

    @radiolips
    Member

    We'll take a look at adding this ability into v.0.2.7 so that no hacky workaround will be required

  11. modified the milestones: v0.2.7, v0.3.0 on Aug 20, 2016
  12. ValentinFunk commented on Oct 13, 2016

    @ValentinFunk

    Also looking for this, has anyone found a workaround for this?

  13. nelsonad commented on Oct 19, 2016

    @nelsonad

    Hey all, I ran into this issue too and posted my fix before I saw this issue.

    #542

    Edit! My fix addresses the issue @attractivePoop was seeing with "out" triggering before "over"

  14. AurelDragut commented on Nov 4, 2016

    @AurelDragut

    Guys, what do you think about reloading the source grid's content on drag start?

  15. radiolips commented on May 11, 2017

    @radiolips
    Member

    This will be available in some form or another in v1.0.0. Please check my blog for more information. I'll post in the next few days about how this will work.

  16. radiolips commented on May 15, 2017

    @radiolips
    Member

    This works on the develop branch now. Please be sure to use draggable setting helper: clone.

  17. tanobi92 commented on May 26, 2017

    @tanobi92

    Hi @radiolips , I tried to use setting helper: clone for draggable in example two.html, but failed. I downloaded new version 1.0.0. Help me! Thanks!

  18. abayob commented on May 26, 2017

    @abayob

    @tanobi92 It works fine here! What is your code, how are you using it? What do you expect should happen?

  19. tanobi92 commented on May 26, 2017

    @tanobi92

    Oh @radiolips , @abayob , I use file gridstack.all.js in folder "dist" when it runs, and I use gridstack.js when it fail.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions