Sortable: Support for other transform properties (like rotation)

Created on 7 Aug 2019  路  3Comments  路  Source: SortableJS/Sortable

Problem:

Because Sortable.js uses transform: translate(0, 0) to position the hovering item, you can't use any other transform like rotation. I wanted to use rotation to slightly rotate the hovering item, to show the user they picked up an item. Similar to how Trello does it.

JSBin/JSFiddle demonstrating the problem:

https://jsbin.com/bakakaroyu/edit?html,css,js,output

In the JSBin I added the rotation transform and you'll see it doesn't do anything. I'm not sure what's the best way to support this. But maybe adding a callback to add extra transforms to your transform or something?

enhancement

Most helpful comment

Done in commit 1c7847b12b52cb35a31d95b2e370c24a8a5a0712. You can build from the master branch or wait for new release which will be soon.

All 3 comments

@kevinvanmierlo Thanks for bringing this up, this would be a great feature. I will get back to you once I have fixed this.

Done in commit 1c7847b12b52cb35a31d95b2e370c24a8a5a0712. You can build from the master branch or wait for new release which will be soon.

Hi, I'm having a similar issue with transform: skewX(-15deg); I think I麓m already updated to 1.10.1. On my project I'm using vuedraggable 2.23.2.

Was this page helpful?
0 / 5 - 0 ratings