mirror of
https://github.com/google/blockly.git
synced 2026-01-09 10:00:09 +01:00
Migrate core/interfaces/i_drag_target.js named requires
This commit is contained in:
@@ -15,15 +15,15 @@
|
||||
goog.module('Blockly.IDragTarget');
|
||||
goog.module.declareLegacyNamespace();
|
||||
|
||||
goog.require('Blockly.IComponent');
|
||||
const IComponent = goog.require('Blockly.IComponent');
|
||||
const IDraggable = goog.requireType('Blockly.IDraggable');
|
||||
const Rect = goog.requireType('Blockly.utils.Rect');
|
||||
|
||||
goog.requireType('Blockly.IDraggable');
|
||||
goog.requireType('Blockly.utils.Rect');
|
||||
|
||||
/**
|
||||
* Interface for a component with custom behaviour when a block or bubble is
|
||||
* dragged over or dropped on top of it.
|
||||
* @extends {Blockly.IComponent}
|
||||
* @extends {IComponent}
|
||||
* @interface
|
||||
*/
|
||||
const IDragTarget = function() {};
|
||||
@@ -31,14 +31,14 @@ const IDragTarget = function() {};
|
||||
/**
|
||||
* Returns the bounding rectangle of the drag target area in pixel units
|
||||
* relative to viewport.
|
||||
* @return {?Blockly.utils.Rect} The component's bounding box. Null if drag
|
||||
* @return {?Rect} The component's bounding box. Null if drag
|
||||
* target area should be ignored.
|
||||
*/
|
||||
IDragTarget.prototype.getClientRect;
|
||||
|
||||
/**
|
||||
* Handles when a cursor with a block or bubble enters this drag target.
|
||||
* @param {!Blockly.IDraggable} dragElement The block or bubble currently being
|
||||
* @param {!IDraggable} dragElement The block or bubble currently being
|
||||
* dragged.
|
||||
*/
|
||||
IDragTarget.prototype.onDragEnter;
|
||||
@@ -46,7 +46,7 @@ IDragTarget.prototype.onDragEnter;
|
||||
/**
|
||||
* Handles when a cursor with a block or bubble is dragged over this drag
|
||||
* target.
|
||||
* @param {!Blockly.IDraggable} dragElement The block or bubble currently being
|
||||
* @param {!IDraggable} dragElement The block or bubble currently being
|
||||
* dragged.
|
||||
*/
|
||||
IDragTarget.prototype.onDragOver;
|
||||
@@ -54,7 +54,7 @@ IDragTarget.prototype.onDragOver;
|
||||
|
||||
/**
|
||||
* Handles when a cursor with a block or bubble exits this drag target.
|
||||
* @param {!Blockly.IDraggable} dragElement The block or bubble currently being
|
||||
* @param {!IDraggable} dragElement The block or bubble currently being
|
||||
* dragged.
|
||||
*/
|
||||
IDragTarget.prototype.onDragExit;
|
||||
@@ -62,7 +62,7 @@ IDragTarget.prototype.onDragExit;
|
||||
/**
|
||||
* Handles when a block or bubble is dropped on this component.
|
||||
* Should not handle delete here.
|
||||
* @param {!Blockly.IDraggable} dragElement The block or bubble currently being
|
||||
* @param {!IDraggable} dragElement The block or bubble currently being
|
||||
* dragged.
|
||||
*/
|
||||
IDragTarget.prototype.onDrop;
|
||||
@@ -71,7 +71,7 @@ IDragTarget.prototype.onDrop;
|
||||
* Returns whether the provided block or bubble should not be moved after being
|
||||
* dropped on this component. If true, the element will return to where it was
|
||||
* when the drag started.
|
||||
* @param {!Blockly.IDraggable} dragElement The block or bubble currently being
|
||||
* @param {!IDraggable} dragElement The block or bubble currently being
|
||||
* dragged.
|
||||
* @return {boolean} Whether the block or bubble provided should be returned to
|
||||
* drag start.
|
||||
|
||||
Reference in New Issue
Block a user