我有html工具箱的圖像集。我想將它們拖放到raphael畫布上。使用jQuery UI或HTML5我想我可以拖放,但如何使該工具箱HTML元素(圖像)拉斐爾對象時,它被刪除?Raphael.JS:如何拖放圖像DOM元素在拉斐爾紙
我需要經過HTML ELEM功能拉斐爾這樣的:
var r = Raphael(0, 0, 800, 800);
raiseMeWhenDropped(html_elem, e) {
// create image on canvas area when dropped from toolbox
r.image(html_elem.src, e.mouseXdropped, e.mouseYdropped, 30, 30);
}
你可以把測試用例上的jsfiddle – Ian