mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-12-25 17:40:29 +00:00
parent
320e0af68c
commit
2571f534aa
@ -124,6 +124,7 @@ LinkWidget.prototype.handleClickEvent = function (event) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
LinkWidget.prototype.handleDragStartEvent = function(event) {
|
LinkWidget.prototype.handleDragStartEvent = function(event) {
|
||||||
|
if(event.target === this.domNodes[0]) {
|
||||||
if(this.to) {
|
if(this.to) {
|
||||||
// Set the dragging class on the element being dragged
|
// Set the dragging class on the element being dragged
|
||||||
$tw.utils.addClass(event.target,"tc-tiddlylink-dragging");
|
$tw.utils.addClass(event.target,"tc-tiddlylink-dragging");
|
||||||
@ -166,15 +167,18 @@ LinkWidget.prototype.handleDragStartEvent = function(event) {
|
|||||||
} else {
|
} else {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
LinkWidget.prototype.handleDragEndEvent = function(event) {
|
LinkWidget.prototype.handleDragEndEvent = function(event) {
|
||||||
|
if(event.target === this.domNodes[0]) {
|
||||||
// Remove the dragging class on the element being dragged
|
// Remove the dragging class on the element being dragged
|
||||||
$tw.utils.removeClass(event.target,"tc-tiddlylink-dragging");
|
$tw.utils.removeClass(event.target,"tc-tiddlylink-dragging");
|
||||||
// Delete the drag image element
|
// Delete the drag image element
|
||||||
if(this.dragImage) {
|
if(this.dragImage) {
|
||||||
this.dragImage.parentNode.removeChild(this.dragImage);
|
this.dragImage.parentNode.removeChild(this.dragImage);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user