Javascript image proxy.

M

mateo.barraza

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
 
P

petermichaux

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/listinfo/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/

Peter
 
M

mateo.barraza

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.

M.
 
P

petermichaux

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top