Files
blockly/demos/custom-fields/pitch/blocks.js
Sam El-Husseini dd9257e1b0 Field Text transformation methods (#2930)
* Add field text transform methods for converting from text to value and vice versa.
2019-08-30 17:00:31 -07:00

34 lines
992 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 Blockly.FieldPitch('7'), 'PITCH');
this.setStyle('loop_blocks');
}
};