Files
blockly/core/interfaces/i_positionable.js
Neil Fraser 90b3f75d82 Remove @author tags (#5601)
Our files are up to a decade old, and have churned so much, that the initial author of the file no longer has much meaning.

Furthermore, this will encourage developers to post to the developer group, rather than emailing Googlers (usually me) directly.
2021-10-15 09:50:46 -07:00

52 lines
1.4 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/**
* @license
* Copyright 2021 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
/**
* @fileoverview The interface for a positionable UI element.
*/
'use strict';
/**
* The interface for a positionable UI element.
* @namespace Blockly.IPositionable
*/
goog.module('Blockly.IPositionable');
/* eslint-disable-next-line no-unused-vars */
const IComponent = goog.require('Blockly.IComponent');
/* eslint-disable-next-line no-unused-vars */
const MetricsManager = goog.requireType('Blockly.MetricsManager');
/* eslint-disable-next-line no-unused-vars */
const Rect = goog.requireType('Blockly.utils.Rect');
/**
* Interface for a component that is positioned on top of the workspace.
* @extends {IComponent}
* @interface
* @alias Blockly.IPositionable
*/
const IPositionable = function() {};
/**
* Positions the element. Called when the window is resized.
* @param {!MetricsManager.UiMetrics} metrics The workspace metrics.
* @param {!Array<!Rect>} savedPositions List of rectangles that
* are already on the workspace.
*/
IPositionable.prototype.position;
/**
* Returns the bounding rectangle of the UI element in pixel units relative to
* the Blockly injection div.
* @return {?Rect} The UI elementss bounding box. Null if
* bounding box should be ignored by other UI elements.
*/
IPositionable.prototype.getBoundingRectangle;
exports = IPositionable;