mirror of
https://github.com/google/blockly.git
synced 2026-01-08 09:30:06 +01:00
Rename trashcan api calls for open/close lid. (#4110)
* Rename trashcan api calls for open/close lid. * Update comments.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user