Rename trashcan api calls for open/close lid. (#4110)

* Rename trashcan api calls for open/close lid.

* Update comments.
This commit is contained in:
Monica Kozbial
2020-08-05 12:25:35 -07:00
committed by GitHub
parent 4fad1b86d8
commit 12b5658109
3 changed files with 22 additions and 22 deletions

View File

@@ -287,15 +287,15 @@ Blockly.BlockDragger.prototype.maybeDeleteBlock_ = function() {
if (this.wouldDeleteBlock_) {
if (trashcan) {
setTimeout(trashcan.close.bind(trashcan), 100);
setTimeout(trashcan.closeLid.bind(trashcan), 100);
}
// Fire a move event, so we know where to go back to for an undo.
this.fireMoveEvent_();
this.draggingBlock_.dispose(false, true);
Blockly.draggingConnections = [];
} else if (trashcan) {
// Make sure the trash can is closed.
trashcan.close();
// Make sure the trash can lid is closed.
trashcan.closeLid();
}
return this.wouldDeleteBlock_;
};
@@ -311,12 +311,12 @@ Blockly.BlockDragger.prototype.updateCursorDuringBlockDrag_ = function() {
if (this.wouldDeleteBlock_) {
this.draggingBlock_.setDeleteStyle(true);
if (this.deleteArea_ == Blockly.DELETE_AREA_TRASH && trashcan) {
trashcan.setOpen(true);
trashcan.setLidOpen(true);
}
} else {
this.draggingBlock_.setDeleteStyle(false);
if (trashcan) {
trashcan.setOpen(false);
trashcan.setLidOpen(false);
}
}
};