Rewrite draggable functionnement for some objects.
Hi,
I need to rewrite the functionnement of draggable for some objet.
I have a toolbar and i need to modify draggble actions.
On double click i need to start the drag.
Simple:
$('.droppableToolbarObject').dblclick(function(ev)
{
$(this).trigger('mousedown', ev);
});
But now i need i'm stuck.
I want to do like in a graphic editor.
-You select your tool by dblclick.
-You can click anywhere in the zone to use the tool
-You can click on the pointer tool to discard current tool and go back
with cursor.
I don't know how to do the second part...
I tried some things with clone() but no success...
You can see a little demo and the current code at:
http://offsetzero.com/JQuery/
http://offsetzero.com/JQuery/scripts/editor.js