diff --git a/core/field.js b/core/field.js index 875828354..f88cbb8bc 100644 --- a/core/field.js +++ b/core/field.js @@ -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. */ diff --git a/core/field_angle.js b/core/field_angle.js index a8369f56e..56778a4b3 100644 --- a/core/field_angle.js +++ b/core/field_angle.js @@ -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. diff --git a/core/field_checkbox.js b/core/field_checkbox.js index a1c15d395..1fe0332e2 100644 --- a/core/field_checkbox.js +++ b/core/field_checkbox.js @@ -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. */ diff --git a/core/field_colour.js b/core/field_colour.js index 69781a92a..18068f50e 100644 --- a/core/field_colour.js +++ b/core/field_colour.js @@ -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. */ diff --git a/core/field_date.js b/core/field_date.js index ffbdf143f..cabd1262f 100644 --- a/core/field_date.js +++ b/core/field_date.js @@ -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. */ diff --git a/core/field_dropdown.js b/core/field_dropdown.js index a614e944b..2fa80bca4 100644 --- a/core/field_dropdown.js +++ b/core/field_dropdown.js @@ -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. */ diff --git a/core/field_image.js b/core/field_image.js index 6e23bb541..6a4c70514 100644 --- a/core/field_image.js +++ b/core/field_image.js @@ -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} diff --git a/core/field_label.js b/core/field_label.js index b2162b29b..fbf1ecb0b 100644 --- a/core/field_label.js +++ b/core/field_label.js @@ -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. */ diff --git a/core/field_textinput.js b/core/field_textinput.js index 858e4bcad..dd84752c1 100644 --- a/core/field_textinput.js +++ b/core/field_textinput.js @@ -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. */ diff --git a/core/field_variable.js b/core/field_variable.js index 6d0a0dd17..7880fdbfb 100644 --- a/core/field_variable.js +++ b/core/field_variable.js @@ -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.