A Metro-style UI page, how to implement the mouse to drag an icon after the other icons based on the location of the dragged icon automatically sorted?
Attention:
The icon size may be different;
Requires the result to be retained (the layout is not changed after overloading the page);
No need to consider compatibility, just a brief talk about the idea.
The effect is like the Windows10 Start menu:
Reply content:
A Metro-style UI page, how to implement the mouse to drag an icon after the other icons based on the location of the dragged icon automatically sorted?
Attention:
The icon size may be different;
Requires the result to be retained (the layout is not changed after overloading the page);
No need to consider compatibility, just a brief talk about the idea.
The effect is like the Windows10 Start menu:
This is based on the coordinates, an icon is dragged to a position, the coordinates of the icon is the coordinates of the new position, the coordinates of the affected icon minus the width or width of the drag icon
There should be a corresponding plug-in bar
Personally feel can be understood as two locations to exchange, yesterday with a plug-in you can try "sortable.js" very small 3kb or so, and very useful
Quick words suggested with plug-in, write yourself that I feel pretty bull
Official have implementation and documentation
metroui:http://metroui.org.ua/
Start-screen:http://metroui.org.ua/templat ...