mirror of
https://github.com/google/blockly.git
synced 2026-01-10 18:37:09 +01:00
Fix bug with updating cursor style in draggers (#4889)
This commit is contained in:
@@ -217,12 +217,12 @@ Blockly.BlockDragger.prototype.dragBlock = function(e, currentDragDeltaXY) {
|
||||
}
|
||||
|
||||
this.draggedConnectionManager_.update(delta, this.dragTarget_);
|
||||
var wouldDeleteBlock = this.draggedConnectionManager_.wouldDeleteBlock();
|
||||
if (wouldDeleteBlock != this.wouldDeleteBlock_) {
|
||||
var oldWouldDeleteBlock = this.wouldDeleteBlock_;
|
||||
this.wouldDeleteBlock_ = this.draggedConnectionManager_.wouldDeleteBlock();
|
||||
if (oldWouldDeleteBlock != this.wouldDeleteBlock_) {
|
||||
// Prevent unnecessary add/remove class calls.
|
||||
this.updateCursorDuringBlockDrag_();
|
||||
}
|
||||
this.wouldDeleteBlock_ = wouldDeleteBlock;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -142,12 +142,12 @@ Blockly.BubbleDragger.prototype.dragBubble = function(e, currentDragDeltaXY) {
|
||||
this.dragTarget_ && this.dragTarget_.onDragEnter();
|
||||
}
|
||||
|
||||
var wouldDeleteBubble = this.shouldDelete_(this.dragTarget_);
|
||||
if (wouldDeleteBubble != this.wouldDeleteBubble_) {
|
||||
var oldWouldDeleteBubble = this.wouldDeleteBubble_;
|
||||
this.wouldDeleteBubble_ = this.shouldDelete_(this.dragTarget_);
|
||||
if (oldWouldDeleteBubble != this.wouldDeleteBubble_) {
|
||||
// Prevent unnecessary add/remove class calls.
|
||||
this.updateCursorDuringBubbleDrag_();
|
||||
}
|
||||
this.wouldDeleteBubble_ = wouldDeleteBubble;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user