mirror of
https://github.com/google/blockly.git
synced 2026-01-09 01:50:11 +01:00
fix: component id should be on the prototype (#6104)
This commit is contained in:
@@ -49,6 +49,13 @@ class DeleteArea extends DragTarget {
|
||||
* @protected
|
||||
*/
|
||||
this.wouldDelete_ = false;
|
||||
|
||||
/**
|
||||
* The unique id for this component that is used to register with the
|
||||
* ComponentManager.
|
||||
* @type {string}
|
||||
*/
|
||||
this.id;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -33,6 +33,19 @@ const {Rect} = goog.requireType('Blockly.utils.Rect');
|
||||
* @alias Blockly.DragTarget
|
||||
*/
|
||||
class DragTarget {
|
||||
/**
|
||||
* Constructor for DragTarget. It exists to add the id property and should not
|
||||
* be called directly, only by a subclass.
|
||||
*/
|
||||
constructor() {
|
||||
/**
|
||||
* The unique id for this component that is used to register with the
|
||||
* ComponentManager.
|
||||
* @type {string}
|
||||
*/
|
||||
this.id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles when a cursor with a block or bubble enters this drag target.
|
||||
* @param {!IDraggable} _dragElement The block or bubble currently being
|
||||
|
||||
@@ -63,4 +63,9 @@ IBlockDragger.prototype.endDrag;
|
||||
*/
|
||||
IBlockDragger.prototype.getInsertionMarkers;
|
||||
|
||||
/**
|
||||
* Sever all links from this object and do any necessary cleanup.
|
||||
*/
|
||||
IBlockDragger.prototype.dispose;
|
||||
|
||||
exports.IBlockDragger = IBlockDragger;
|
||||
|
||||
@@ -32,6 +32,6 @@ const IComponent = function() {};
|
||||
* ComponentManager.
|
||||
* @type {string}
|
||||
*/
|
||||
IComponent.id;
|
||||
IComponent.prototype.id;
|
||||
|
||||
exports.IComponent = IComponent;
|
||||
|
||||
Reference in New Issue
Block a user