Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
260 views
in Technique[技术] by (71.8m points)

gridstack 3.1.4 and sortablejs: draggable sort dont work - draggable zone overlays html content (?)

I'm using gridstack v 0.4.0 with sortable.js. In Gridstack i have a widget with a list, sortable.js makes the list reorderable via drag and drop. This works like a charm :-)

I updated to v 3.1.4. The grid works great, but my sortable.js list is not working. After many tests I found out, that when I set the option setstatic to true the sortable works. Now when I move the mouse over an element the mouse pointer turns into an input cursor. If setstatic is set to false and I move the mouse over an element, the cursor remains.

Every widget has a header, draggable handle is set to the header class.

I think the draggable zone is set over the complete widget element and not only on the header.

How can sortablejs working again with gridstack staticGrid false?

Hope someone can help.

Here are some codepens:

Gridstack 3.1.4 - staticGrid: false - Sortable in Grid dont  work

https://codepen.io/LordKingPin2020/pen/ZEpZXqW

Gridstack 3.1.4 - staticGrid: true - Sortable in Grid work (but widget cant be moved :( 

https://codepen.io/LordKingPin2020/pen/ZEpZXpE

question from:https://stackoverflow.com/questions/65829992/gridstack-3-1-4-and-sortablejs-draggable-sort-dont-work-draggable-zone-overla

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...