1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-12-02 06:48:06 +00:00

using $tw.dragging to prevent dnd in same window

Anything missing?
This commit is contained in:
Tobias Beer
2015-02-10 23:34:37 +01:00
parent 30f2c06c9e
commit dc23963525
2 changed files with 6 additions and 0 deletions

View File

@@ -126,6 +126,7 @@ LinkWidget.prototype.handleClickEvent = function(event) {
LinkWidget.prototype.handleDragStartEvent = function(event) {
if(event.target === this.domNodes[0]) {
if(this.to) {
$tw.dragging = true;
// Set the dragging class on the element being dragged
$tw.utils.addClass(event.target,"tc-tiddlylink-dragging");
// Create the drag image elements
@@ -173,6 +174,7 @@ LinkWidget.prototype.handleDragStartEvent = function(event) {
LinkWidget.prototype.handleDragEndEvent = function(event) {
if(event.target === this.domNodes[0]) {
$tw.dragging = false;
// Remove the dragging class on the element being dragged
$tw.utils.removeClass(event.target,"tc-tiddlylink-dragging");
// Delete the drag image element