Hi! is it possible to make a drag dependent on a KeyPress event? I couldn''t find any information on that on the script.aculo.us website. My scenario is the following: I have a tree with several nodes (like windows explorer). Right now i use Drag & Drop to move a node below a new parent. Now i want to implement a copy mechanism which allows the user to copy a node through Drag & Drop while pressing a key (e.g. CTRL). Can i register more than one draggables to an element and differentiate the handlers by a secondary event keyPress? Any help would be greatly appreciated. Regards, Johannes -- Posted via http://www.ruby-forum.com/.
why don''t you just check for the key in the ondrop event Am 29.03.2006 um 14:28 schrieb Johannes Goerz:> Hi! > > is it possible to make a drag dependent on a KeyPress event? I > couldn''t > find any information on that on the script.aculo.us website. > > My scenario is the following: > I have a tree with several nodes (like windows explorer). Right now i > use Drag & Drop to move a node below a new parent. > > Now i want to implement a copy mechanism which allows the user to > copy a > node through Drag & Drop while pressing a key (e.g. CTRL). Can i > register more than one draggables to an element and differentiate the > handlers by a secondary event keyPress? > > Any help would be greatly appreciated. > > Regards, > Johannes > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >
i guess you are right: the dropable should be the place where to check the keypress-event. but isn''t there a built-in functionality for that in script.aculo.us? i''d prefer using just the standard library rather than extending it with my own javascript stuff... David Zülke wrote:> why don''t you just check for the key in the ondrop event > > > Am 29.03.2006 um 14:28 schrieb Johannes Goerz:-- Posted via http://www.ruby-forum.com/.