mirror of
https://github.com/google/blockly.git
synced 2026-01-08 17:40:09 +01:00
* Add hideChaff() to core/workspace_svg.js * Mark Blockly.hideChaff as deprecated * Update uses of Blockly.hideChaff() to WorkspaceSvg.hideChaff() in core * Update uses of Blockly.hideChaff() to WorkspaceSvg.hideChaff() in demos * Style and formatting fixes * Switch from accessor to stub wrapper for Blockly.hideChaff Co-authored-by: Christopher Allen <cpcallen+github@gmail.com> Co-authored-by: Christopher Allen <cpcallen+github@gmail.com>
37 lines
861 B
JavaScript
37 lines
861 B
JavaScript
/**
|
|
* @license
|
|
* Copyright 2021 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
/**
|
|
* @fileoverview The interface for a component that is automatically hidden
|
|
* when WorkspaceSvg.hideChaff is called.
|
|
* @author kozbial@google.com (Monica Kozbial)
|
|
*/
|
|
|
|
'use strict';
|
|
|
|
goog.module('Blockly.IAutoHideable');
|
|
goog.module.declareLegacyNamespace();
|
|
|
|
/* eslint-disable-next-line no-unused-vars */
|
|
const IComponent = goog.requireType('Blockly.IComponent');
|
|
|
|
|
|
/**
|
|
* Interface for a component that can be automatically hidden.
|
|
* @extends {IComponent}
|
|
* @interface
|
|
*/
|
|
const IAutoHideable = function() {};
|
|
|
|
/**
|
|
* Hides the component. Called in WorkspaceSvg.hideChaff.
|
|
* @param {boolean} onlyClosePopups Whether only popups should be closed.
|
|
* Flyouts should not be closed if this is true.
|
|
*/
|
|
IAutoHideable.prototype.autoHide;
|
|
|
|
exports = IAutoHideable;
|