i have this code, from the doc, to set an image under the cursor when
dnd on a Tb thread pane message. i've tried with a visible xul <image>
element as well. nothing shows an image.
do you have an example? xul or html, i haven't found either anywhere.
dnd on the Fx urlbar favicon doesn't show a dragged image for me, should it?
-----------
var _ThreadPaneOnDragStart = ThreadPaneOnDragStart;
ThreadPaneOnDragStart = function TM_ThreadPaneOnDragStart(aEvent) {
if (v.editingMode) {
// In edit mode, support drag and drop rethreading of messages.
...
var image =
document.createElementNS("
http://www.w3.org/1999/xhtml","html:canvas");
image.width = image.height = 50;
var ctx = image.getContext("2d");
ctx.lineWidth = 4;
ctx.moveTo(0, 0);
ctx.lineTo(50, 50);
ctx.moveTo(0, 50);
ctx.lineTo(50, 0);
ctx.stroke();
var dt = aEvent.dataTransfer;
dt.setData('text/plain', 'Data to Drag');
// aEvent.dataTransfer.effectAllowed = "move";
// aEvent.dataTransfer.dropEffect = "move";
dt.setDragImage(image, 0, 0);
_u.log.debug("ThreadPaneOnDragStart: image - "+
image.id);
return;
}
_ThreadPaneOnDragStart(aEvent);
}