mirror of
https://github.com/scratchfoundation/scratch-blocks.git
synced 2025-07-23 04:09:47 -04:00
Code cleanup addressing PR comments
This commit is contained in:
parent
4843e35894
commit
2c2970df57
7 changed files with 73 additions and 19 deletions
|
@ -337,8 +337,9 @@ Blockly.WorkspaceCommentSvg.prototype.resizeMouseUp_ = function(/*e*/) {
|
|||
this.unbindDragEvents_();
|
||||
var oldHW = this.resizeStartSize_;
|
||||
this.resizeStartSize_ = null;
|
||||
if (this.width_ == oldHW.width &&
|
||||
this.height_ == oldHW.height) return;
|
||||
if (this.width_ == oldHW.width && this.height_ == oldHW.height) {
|
||||
return;
|
||||
}
|
||||
// Fire a change event for the new width/height after
|
||||
// resize mouse up
|
||||
Blockly.Events.fire(new Blockly.Events.CommentChange(
|
||||
|
@ -365,7 +366,9 @@ Blockly.WorkspaceCommentSvg.prototype.resizeMouseMove_ = function(e) {
|
|||
disabled = true;
|
||||
}
|
||||
this.setSize(this.RTL ? -newXY.x : newXY.x, newXY.y);
|
||||
if (disabled) Blockly.Events.enable();
|
||||
if (disabled) {
|
||||
Blockly.Events.enable();
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue