Improvements for #1483

* Rename the global to $tw.dragInProgress for clarity.
* Abort the dragenter so that we don’t get extraneous feedback during
the drag
This commit is contained in:
Jermolene
2015-02-10 23:17:38 +00:00
parent 1b87d9134b
commit 1924eda8a9
2 changed files with 14 additions and 6 deletions

View File

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