1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-03-21 10:56:56 +00:00

Fix problem with covering of the dragger image

Fixes 
This commit is contained in:
Jermolene 2013-12-17 13:39:46 +00:00
parent 066a4d9fbc
commit db85bfe513

@ -114,13 +114,12 @@ LinkWidget.prototype.handleDragStartEvent = function(event) {
this.dragImage.appendChild(inner);
this.document.body.appendChild(this.dragImage);
// Astoundingly, we need to cover the dragger up: http://www.kryogenix.org/code/browser/custom-drag-image.html
var bounds = this.dragImage.firstChild.getBoundingClientRect(),
cover = this.document.createElement("div");
var cover = this.document.createElement("div");
cover.className = "tw-tiddler-dragger-cover";
cover.style.left = (bounds.left - 16) + "px";
cover.style.top = (bounds.top - 16) + "px";
cover.style.width = (bounds.width + 32) + "px";
cover.style.height = (bounds.height + 32) + "px";
cover.style.left = (inner.offsetLeft - 16) + "px";
cover.style.top = (inner.offsetTop - 16) + "px";
cover.style.width = (inner.offsetWidth + 32) + "px";
cover.style.height = (inner.offsetHeight + 32) + "px";
this.dragImage.appendChild(cover);
// Set the data transfer properties
var dataTransfer = event.dataTransfer;