mirror of
https://github.com/google/blockly.git
synced 2026-01-06 16:40:07 +01:00
Removed unreachable functions from Blockly.Component
This commit is contained in:
@@ -409,34 +409,6 @@ Blockly.Component.prototype.disposeInternal = function() {
|
||||
this.parent_ = null;
|
||||
};
|
||||
|
||||
/**
|
||||
* Helper function for subclasses that gets a unique id for a given fragment,
|
||||
* this can be used by components to generate unique string ids for DOM
|
||||
* elements.
|
||||
* @param {string} idFragment A partial id.
|
||||
* @return {string} Unique element id.
|
||||
* @protected
|
||||
*/
|
||||
Blockly.Component.prototype.makeId = function(idFragment) {
|
||||
return this.getId() + '.' + idFragment;
|
||||
};
|
||||
|
||||
/**
|
||||
* Makes a collection of ids. This is a convenience method for makeId. The
|
||||
* object's values are the id fragments and the new values are the generated
|
||||
* ids. The key will remain the same.
|
||||
* @param {Object} object The object that will be used to create the ids.
|
||||
* @return {!Object<string, string>} An object of id keys to generated ids.
|
||||
* @protected
|
||||
*/
|
||||
Blockly.Component.prototype.makeIds = function(object) {
|
||||
var ids = {};
|
||||
for (var key in object) {
|
||||
ids[key] = this.makeId(object[key]);
|
||||
}
|
||||
return ids;
|
||||
};
|
||||
|
||||
/**
|
||||
* Adds the specified component as the last child of this component. See
|
||||
* {@link Blockly.Component#addChildAt} for detailed semantics.
|
||||
@@ -622,22 +594,6 @@ Blockly.Component.prototype.getChildCount = function() {
|
||||
return this.children_ ? this.children_.length : 0;
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns an array containing the IDs of the children of this component, or an
|
||||
* empty array if the component has no children.
|
||||
* @return {!Array.<string>} Child component IDs.
|
||||
* @protected
|
||||
*/
|
||||
Blockly.Component.prototype.getChildIds = function() {
|
||||
var ids = [];
|
||||
|
||||
this.forEachChild(function(child) {
|
||||
ids.push(child.getId());
|
||||
});
|
||||
|
||||
return ids;
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns the child with the given ID, or null if no such child exists.
|
||||
* @param {string} id Child component ID.
|
||||
|
||||
Reference in New Issue
Block a user