Files
blockly/demos/custom-fields/pitch/blocks.js
Sam El-Husseini e8a3964a1c Rename the pitch field (#2965)
* Rename the pitch field to fall under the CustomFields namespace.
2019-09-04 10:09:42 -07:00

34 lines
997 B
JavaScript

/**
* @license
* Visual Blocks Editor
*
* Copyright 2019 Google Inc.
* https://developers.google.com/blockly/
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Pitch field demo blocks.
* @author samelh@gmail.com (Sam El-Husseini)
*/
Blockly.Blocks['test_pitch_field'] = {
init: function() {
this.appendDummyInput()
.appendField('pitch')
.appendField(new CustomFields.FieldPitch('7'), 'PITCH');
this.setStyle('loop_blocks');
}
};