mirror of
https://github.com/scratchfoundation/scratch-blocks.git
synced 2025-08-28 22:10:31 -04:00
Merge pull request #478 from drigz/bugfix/476
Check flyout in isDragging()
This commit is contained in:
commit
b4a938f804
2 changed files with 4 additions and 1 deletions
|
@ -774,6 +774,7 @@ Blockly.Flyout.prototype.onMouseDown_ = function(e) {
|
|||
this.dragMode_ = Blockly.DRAG_FREE;
|
||||
this.startDragMouseY_ = e.clientY;
|
||||
this.startDragMouseX_ = e.clientX;
|
||||
Blockly.Flyout.startFlyout_ = this;
|
||||
Blockly.Flyout.onMouseMoveWrapper_ = Blockly.bindEvent_(document, 'mousemove',
|
||||
this, this.onMouseMove_);
|
||||
Blockly.Flyout.onMouseUpWrapper_ = Blockly.bindEvent_(document, 'mouseup',
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue