Remove unused field clone.

This commit is contained in:
Neil Fraser
2015-07-20 16:17:21 -07:00
parent 98a76a62db
commit 45fd0e9d44
10 changed files with 0 additions and 93 deletions

View File

@@ -63,17 +63,6 @@ Blockly.Field.prototype.visible_ = true;
*/
Blockly.Field.prototype.changeHandler_ = null;
/**
* Clone this Field. This must be implemented by all classes derived from
* Field. Since this class should not be instantiated, calling this method
* throws an exception.
* @throws {goog.assert.AssertionError}
*/
Blockly.Field.prototype.clone = function() {
goog.asserts.fail('There should never be an instance of Field, ' +
'only its derived classes.');
};
/**
* Non-breaking space.
*/

View File

@@ -81,15 +81,6 @@ Blockly.FieldAngle.prototype.setChangeHandler = function(handler) {
Blockly.FieldAngle.superClass_.setChangeHandler(wrappedHandler);
};
/**
* Clone this FieldAngle.
* @return {!Blockly.FieldAngle} The result of calling the constructor again
* with the current values of the arguments used during construction.
*/
Blockly.FieldAngle.prototype.clone = function() {
return new Blockly.FieldAngle(this.getText(), this.changeHandler_);
};
/**
* Round angles to the nearest 15 degrees when using mouse.
* Set to 0 to disable rounding.

View File

@@ -48,15 +48,6 @@ Blockly.FieldCheckbox = function(state, opt_changeHandler) {
};
goog.inherits(Blockly.FieldCheckbox, Blockly.Field);
/**
* Clone this FieldCheckbox.
* @return {!Blockly.FieldCheckbox} The result of calling the constructor again
* with the current values of the arguments used during construction.
*/
Blockly.FieldCheckbox.prototype.clone = function() {
return new Blockly.FieldCheckbox(this.getValue(), this.changeHandler_);
};
/**
* Mouse cursor style when over the hotspot that initiates editability.
*/

View File

@@ -67,15 +67,6 @@ Blockly.FieldColour.prototype.init = function(block) {
this.setValue(this.getValue());
};
/**
* Clone this FieldColour.
* @return {!Blockly.FieldColour} The result of calling the constructor again
* with the current values of the arguments used during construction.
*/
Blockly.FieldColour.prototype.clone = function() {
return new Blockly.FieldColour(this.getValue(), this.changeHandler_);
};
/**
* Mouse cursor style when over the hotspot that initiates the editor.
*/

View File

@@ -57,15 +57,6 @@ Blockly.FieldDate = function(date, opt_changeHandler) {
};
goog.inherits(Blockly.FieldDate, Blockly.Field);
/**
* Clone this FieldDate.
* @return {!Blockly.FieldDate} The result of calling the constructor again
* with the current values of the arguments used during construction.
*/
Blockly.FieldDate.prototype.clone = function() {
return new Blockly.FieldDate(this.getValue(), this.changeHandler_);
};
/**
* Mouse cursor style when over the hotspot that initiates the editor.
*/

View File

@@ -71,15 +71,6 @@ Blockly.FieldDropdown.CHECKMARK_OVERHANG = 25;
*/
Blockly.FieldDropdown.ARROW_CHAR = goog.userAgent.ANDROID ? '\u25BC' : '\u25BE';
/**
* Clone this FieldDropdown.
* @return {!Blockly.FieldDropdown} The result of calling the constructor again
* with the current values of the arguments used during construction.
*/
Blockly.FieldDropdown.prototype.clone = function() {
return new Blockly.FieldDropdown(this.menuGenerator_, this.changeHandler_);
};
/**
* Mouse cursor style when over the hotspot that initiates the editor.
*/

View File

@@ -51,16 +51,6 @@ Blockly.FieldImage = function(src, width, height, opt_alt) {
};
goog.inherits(Blockly.FieldImage, Blockly.Field);
/**
* Clone this FieldImage.
* @return {!Blockly.FieldImage} The result of calling the constructor again
* with the current values of the arguments used during construction.
*/
Blockly.FieldImage.prototype.clone = function() {
return new Blockly.FieldImage(this.getSrc(), this.width_, this.height_,
this.getText());
};
/**
* Rectangular mask used by Firefox.
* @type {Element}

View File

@@ -45,15 +45,6 @@ Blockly.FieldLabel = function(text) {
};
goog.inherits(Blockly.FieldLabel, Blockly.Field);
/**
* Clone this FieldLabel.
* @return {!Blockly.FieldLabel} The result of calling the constructor again
* with the current values of the arguments used during construction.
*/
Blockly.FieldLabel.prototype.clone = function() {
return new Blockly.FieldLabel(this.getText());
};
/**
* Editable fields are saved by the XML renderer, non-editable fields are not.
*/

View File

@@ -49,15 +49,6 @@ Blockly.FieldTextInput = function(text, opt_changeHandler) {
};
goog.inherits(Blockly.FieldTextInput, Blockly.Field);
/**
* Clone this FieldTextInput.
* @return {!Blockly.FieldTextInput} The result of calling the constructor again
* with the current values of the arguments used during construction.
*/
Blockly.FieldTextInput.prototype.clone = function() {
return new Blockly.FieldTextInput(this.getText(), this.changeHandler_);
};
/**
* Mouse cursor style when over the hotspot that initiates the editor.
*/

View File

@@ -101,15 +101,6 @@ Blockly.FieldVariable.prototype.init = function(block) {
Blockly.FieldVariable.superClass_.init.call(this, block);
};
/**
* Clone this FieldVariable.
* @return {!Blockly.FieldVariable} The result of calling the constructor again
* with the current values of the arguments used during construction.
*/
Blockly.FieldVariable.prototype.clone = function() {
return new Blockly.FieldVariable(this.getValue(), this.changeHandler_);
};
/**
* Get the variable's name (use a variableDB to convert into a real name).
* Unline a regular dropdown, variables are literal and have no neutral value.