diff --git a/core/block.js b/core/block.js index e1b626e63..9238959d1 100644 --- a/core/block.js +++ b/core/block.js @@ -218,9 +218,10 @@ Blockly.Block.prototype.data = null; /** * Colour of the block as HSV hue value (0-360) + * This may be null if the block colour was not set via a hue number. * @type {?number} * @private - */ + */ Blockly.Block.prototype.hue_ = null; /** @@ -930,7 +931,8 @@ Blockly.Block.prototype.setColour = function(colour) { Blockly.Block.prototype.setStyle = function(blockStyleName) { var style = Blockly.getStyle(); if (!style) { - throw Error('Trying to set block style before Blockly.setStyle() has been called'); + throw Error('Trying to set block style to ' + blockStyleName + + ' before style was defined via Blockly.setStyle().'); } var blockStyle = style.getBlockStyle(blockStyleName); this.styleName_ = blockStyleName; diff --git a/style/classic.js b/style/classic.js index 176d3b44d..410943a28 100644 --- a/style/classic.js +++ b/style/classic.js @@ -21,7 +21,6 @@ /** * @fileoverview Classic style. * Contains multi colored border to create shadow effect. - * @author aschmiedt@google.com (Abby Schmiedt) */ 'use strict'; diff --git a/style/highcontrast.js b/style/highcontrast.js index c318d2997..bf48acc95 100644 --- a/style/highcontrast.js +++ b/style/highcontrast.js @@ -21,7 +21,6 @@ /** * @fileoverview High contrast style. * Darker colors to contrast the white block font. - * @author aschmiedt@google.com (Abby Schmiedt) */ 'use strict'; diff --git a/style/modern.js b/style/modern.js index e568f4b95..8edf293fa 100644 --- a/style/modern.js +++ b/style/modern.js @@ -21,7 +21,6 @@ /** * @fileoverview Modern style. * Same colors as classic, but single colored border. - * @author aschmiedt@google.com (Abby Schmiedt) */ 'use strict'; diff --git a/style/style_script/create_styles.py b/style/style_script/create_styles.py index a41a8c26d..97314cf23 100644 --- a/style/style_script/create_styles.py +++ b/style/style_script/create_styles.py @@ -1,4 +1,4 @@ -# !/usr/bin/python2.7 +# !/usr/bin/env python # Converts a single colour to primary, secondary and tertiary colours. # Primary Colour - The colour given # Secondary Colour - Lightens the primary colour by .8 diff --git a/style/style_script/styles_example.json b/style/style_script/styles_example.json index 9fb8fc100..e58191c18 100644 --- a/style/style_script/styles_example.json +++ b/style/style_script/styles_example.json @@ -1,23 +1,3 @@ -/** - * @license - * Visual Blocks Editor - * - * Copyright 2018 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. - */ - { "colour":"#A5745B", "lists":"260", diff --git a/tests/multi_playground.html b/tests/multi_playground.html index c6f841e88..cc48d80fe 100644 --- a/tests/multi_playground.html +++ b/tests/multi_playground.html @@ -57,7 +57,6 @@ function start() { startBlocklyInstance('HorizontalEndLTR', false, true, 'end', toolbox); startBlocklyInstance('HorizontalEndRTL', true, true, 'end', toolbox); - Blockly.setStyle(Blockly.Styles.Classic); } function startBlocklyInstance(suffix, rtl, horizontalLayout, position,