Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Cannot change the size of the dnd helper #1840

Closed
@koljada

Description

@koljada

Subject of the issue

My goal is to create a sidebar with widgets which can be dragged into the grid. I need to change the default helper to have configured size when dragging, it's not enough for me to have only the following shadow. And it seems like currently it's impossible to do because width and height styles are overridden in _setupDragFollowNodeNotifyStart -> _setupHelperStyle method. I tried to use start event handler but an original event is passed as a target so I can't access the helper element.

Your environment

  • "gridstack": "^4.2.6"
  • "vite": "^2.5.2"
  • gridstack-dd-native
  • Chrome browser

Steps to reproduce

https://jsfiddle.net/koljada/yfbjvg3h/13/

Expected behavior

There must be some way to modify dimensions of the helper

Actual behavior

It's not possible to modify dimensions of the helper

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions