Thaiscorpion
Thaiscorpion

Reputation: 479

How to adjust Mootools Drag.Move class so it doesn't have initial delay in px

Im trying to make a drag and drop system for a game type inventory, and when you click on an item that should be dragged it all works perfect except it has a sort of delay in px you have to drag at least 10px (aprox.) for it to start dragging and that is a problem. Is there any way to solve this?

note: I know jquerys drag class has a propertie that is the initial delay in px but couldnt find the same in mootools.

    $$('DIV.item').makeDraggable({  
                droppables: $$('DIV.slot'),     

                    onStart: function(draggable){

                    },

                    onEnter: function(draggable, droppable){                        

                    },

                    onLeave: function(draggable, droppable){

                    },

                    onDrop: function(draggable, droppable){ 

                        }
                    }   
            });

Here is the official demo in fiddle, you will see how it waits for some px before starting.

Upvotes: 1

Views: 498

Answers (1)

arian
arian

Reputation: 708

See the snap option: http://mootools.net/docs/more/Drag/Drag

Upvotes: 1

Related Questions