diff --git a/core/delete_area.js b/core/delete_area.js index 3985fca90ac..ba2b535d0db 100644 --- a/core/delete_area.js +++ b/core/delete_area.js @@ -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; } /** diff --git a/core/drag_target.js b/core/drag_target.js index 64a3e3ce3f0..71db7477f66 100644 --- a/core/drag_target.js +++ b/core/drag_target.js @@ -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 diff --git a/core/interfaces/i_block_dragger.js b/core/interfaces/i_block_dragger.js index e2108712e33..587da618f0a 100644 --- a/core/interfaces/i_block_dragger.js +++ b/core/interfaces/i_block_dragger.js @@ -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; diff --git a/core/interfaces/i_component.js b/core/interfaces/i_component.js index 3b191ad6f2a..56e25131a4f 100644 --- a/core/interfaces/i_component.js +++ b/core/interfaces/i_component.js @@ -32,6 +32,6 @@ const IComponent = function() {}; * ComponentManager. * @type {string} */ -IComponent.id; +IComponent.prototype.id; exports.IComponent = IComponent;