Hello Sebastien,
finally I found free time to continue this work :)

Actually my question was regarding "Droppable#onDrop, where you can reject
the Draggable item/component", how this can be achieved?

On Wed, May 4, 2016 at 1:28 AM, Sebastien <seb...@gmail.com> wrote:

> 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 {
>
>     @Override
>     public void onConfigure(JQueryBehavior behavior)
>     {
>         super.onConfigure(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,
> Sebastien
>
> [1] https://api.jqueryui.com/draggable/#option-revert
>



-- 
WBR
Maxim aka solomax

Reply via email to