MCPcopy Index your code
hub / github.com/DHTMLX/gantt / onDragStart

Function onDragStart

samples/common/codehighlight/codemirror.js:6561–6582  ·  view source on GitHub ↗
(cm, e)

Source from the content-addressed store, hash-verified

6559 }
6560
6561 function onDragStart(cm, e) {
6562 if (ie && (!cm.state.draggingText || +new Date - lastDrop < 100)) { e_stop(e); return }
6563 if (signalDOMEvent(cm, e) || eventInWidget(cm.display, e)) { return }
6564
6565 e.dataTransfer.setData("Text", cm.getSelection());
6566 e.dataTransfer.effectAllowed = "copyMove";
6567
6568 // Use dummy image instead of default browsers image.
6569 // Recent Safari (~6.0.2) have a tendency to segfault when this happens, so we don't do it there.
6570 if (e.dataTransfer.setDragImage && !safari) {
6571 var img = elt("img", null, null, "position: fixed; left: 0; top: 0;");
6572 img.src = "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==";
6573 if (presto) {
6574 img.width = img.height = 1;
6575 cm.display.wrapper.appendChild(img);
6576 // Force a relayout, or Opera won't use our image for some obscure reason
6577 img._top = img.offsetTop;
6578 }
6579 e.dataTransfer.setDragImage(img, 0, 0);
6580 if (presto) { img.parentNode.removeChild(img); }
6581 }
6582 }
6583
6584 function onDragOver(cm, e) {
6585 var pos = posFromMouse(cm, e);

Callers 1

registerEventHandlersFunction · 0.85

Calls 4

e_stopFunction · 0.85
signalDOMEventFunction · 0.85
eventInWidgetFunction · 0.85
eltFunction · 0.85

Tested by

no test coverage detected