mirror of
https://github.com/google/blockly.git
synced 2026-01-24 09:10:09 +01:00
22
core/interfaces/i_plugin.js
Normal file
22
core/interfaces/i_plugin.js
Normal file
@@ -0,0 +1,22 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2021 Google LLC
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Interface for a plugin.
|
||||
* @author kozbial@google.com (Monica Kozbial)
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
goog.provide('Blockly.IPlugin');
|
||||
|
||||
|
||||
/**
|
||||
* The interface for a workspace plugin.
|
||||
* @interface
|
||||
*/
|
||||
Blockly.IPlugin = function() {};
|
||||
|
||||
@@ -13,21 +13,19 @@
|
||||
|
||||
goog.provide('Blockly.IPositionable');
|
||||
|
||||
goog.require('Blockly.IPlugin');
|
||||
|
||||
|
||||
/**
|
||||
* Interface for a component that is positioned on top of the workspace.
|
||||
* @extends {Blockly.IPlugin}
|
||||
* @interface
|
||||
*/
|
||||
Blockly.IPositionable = function() {};
|
||||
|
||||
/**
|
||||
* Positions the element. Called when the window is resized.
|
||||
* @param {!Blockly.MetricsManager.ContainerRegion} viewMetrics The workspace
|
||||
* viewMetrics.
|
||||
* @param {!Blockly.MetricsManager.AbsoluteMetrics} absoluteMetrics The absolute
|
||||
* metrics for the workspace.
|
||||
* @param {!Blockly.MetricsManager.ToolboxMetrics} toolboxMetrics The toolbox
|
||||
* metrics for the workspace.
|
||||
* @param {!Blockly.MetricsManager.UiMetrics} metrics The workspace metrics.
|
||||
* @param {!Array<Blockly.utils.Rect>} savedPositions List of rectangles that
|
||||
* are already on the workspace.
|
||||
*/
|
||||
@@ -39,5 +37,3 @@ Blockly.IPositionable.prototype.position;
|
||||
* @returns {!Blockly.utils.Rect} The plugin’s bounding box.
|
||||
*/
|
||||
Blockly.IPositionable.prototype.getBoundingRectangle;
|
||||
|
||||
|
||||
|
||||
20
core/interfaces/i_workspace_plugin.js
Normal file
20
core/interfaces/i_workspace_plugin.js
Normal file
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2021 Google LLC
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Interface for plugins that can be registered on the workspace.
|
||||
* @author kozbial@google.com (Monica Kozbial)
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
goog.provide('Blockly.IWorkspacePlugin');
|
||||
|
||||
/**
|
||||
* Base interface for a plugin that can be registered on the workspace.
|
||||
* @interface
|
||||
*/
|
||||
Blockly.IWorkspacePlugin = function() {};
|
||||
Reference in New Issue
Block a user