Hi Maxim,

"revert" options can take a function as argument [1]. maybe you can use it
and test for an additional css class?
I did a quick test and it works as expected:

MyDraggable {

    public void onConfigure(JQueryBehavior behavior)

        behavior.setOption("revert", "function(e) { console.log('e', e); if
(e.hasClass('green')) { return true; } }"); // true means "do revert"

In conjunction to Droppable#onDrop, where you can reject the Draggable
item/component if is not on the correct Droppable

Hope this helps,

[1] https://api.jqueryui.com/draggable/#option-revert

Reply via email to