mirror of
https://github.com/google/blockly.git
synced 2026-01-08 17:40:09 +01:00
fix: do not hide all chaff when resizing (#6916)
This commit is contained in:
committed by
GitHub
parent
2fa7280ce1
commit
2bbb3aa1fc
@@ -2511,14 +2511,25 @@ export class WorkspaceSvg extends Workspace implements IASTNodeLocationSvg {
|
||||
/**
|
||||
* Close tooltips, context menus, dropdown selections, etc.
|
||||
*
|
||||
* @param opt_onlyClosePopups Whether only popups should be closed.
|
||||
* @param onlyClosePopups Whether only popups should be closed. Defaults to
|
||||
* false.
|
||||
*/
|
||||
hideChaff(opt_onlyClosePopups?: boolean) {
|
||||
hideChaff(onlyClosePopups = false) {
|
||||
Tooltip.hide();
|
||||
WidgetDiv.hide();
|
||||
dropDownDiv.hideWithoutAnimation();
|
||||
|
||||
const onlyClosePopups = !!opt_onlyClosePopups;
|
||||
this.hideComponents(onlyClosePopups);
|
||||
}
|
||||
|
||||
/**
|
||||
* Hide any autohideable components (like flyout, trashcan, and any
|
||||
* user-registered components).
|
||||
*
|
||||
* @param onlyClosePopups Whether only popups should be closed. Defaults to
|
||||
* false.
|
||||
*/
|
||||
hideComponents(onlyClosePopups = false) {
|
||||
const autoHideables = this.getComponentManager().getComponents(
|
||||
ComponentManager.Capability.AUTOHIDEABLE, true);
|
||||
autoHideables.forEach(
|
||||
|
||||
Reference in New Issue
Block a user