mateo.barr...@gmail.com wrote:
pe**********@gmail.com wrote: ma***********@gmail.com wrote: Hello,
Is there a way to change the image proxy of a scriptaculous Drag and
Drop element to be anything other than a clone of itself? (ie: image).
Thanks any clues will be appreciated,
M
Hi Mateo,
I just posted a reply to a question about prototype.js. The main point
was to ask on the rails spinoffs list about this
http://lists.rubyonrails.org/mailman...rails-spinoffs
I almost completely rewrote the script.aculo.us dragdrop library and
gave up. It just seemed like a disaster.
Any chance you can switch to the Yahoo! UI dragdrop.js library. I have
been working with it a lot in the last couple weeks. It would be very
easy to do what you want with the Yahoo! UI library.
http://developer.yahoo.com/yui/dragdrop/
Thanks Peter, I will take a look at the yahoo lib.
I also tried to tincker with scriptaculous source to get this working
but it seemed like a pain.
I am also trying to do a Flex version of this feature but to my
surprise Flex can get just as hairy as js... intresting.
With the yahoo ui you will do something like this untested code to set
the image proxy
YAHOO.util.DDProxy.onDragStart = function(e) {
// get the proxy dom element
var dom_element = this.getDragEl();
// do what ever you want with this DOM element
dom_element.style.background = "red";
dom_element.innerHTML = "asdf";
};
Very easy.
Maybe I'll see you on the YUI mailing list.
Peter