mirror of
https://github.com/google/blockly.git
synced 2026-01-07 17:10:11 +01:00
Check flyout in isDragging()
We also have to record startFlyout_ on background scrolls - before dragMode_ wasn't being reset by terminateDrag() for background scrolls, which would suppress clicks from that point on. Fixes #476.
This commit is contained in:
@@ -715,11 +715,13 @@ Blockly.WorkspaceSvg.prototype.moveDrag = function(e) {
|
||||
};
|
||||
|
||||
/**
|
||||
* Is the user currently dragging a block or scrolling the workspace?
|
||||
* Is the user currently dragging a block or scrolling the flyout/workspace?
|
||||
* @return {boolean} True if currently dragging or scrolling.
|
||||
*/
|
||||
Blockly.WorkspaceSvg.prototype.isDragging = function() {
|
||||
return Blockly.dragMode_ == Blockly.DRAG_FREE ||
|
||||
(Blockly.Flyout.startFlyout_ &&
|
||||
Blockly.Flyout.startFlyout_.dragMode_ == Blockly.DRAG_FREE) ||
|
||||
this.dragMode_ == Blockly.DRAG_FREE;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user