mirror of
https://github.com/google/blockly.git
synced 2026-01-10 02:17:09 +01:00
Fixes blockly games blocks being black (#3579)
* Fixes blockly games blocks being black
This commit is contained in:
@@ -593,7 +593,7 @@ Blockly.blockRendering.ConstantProvider.prototype.getBlockStyle = function(
|
||||
Blockly.blockRendering.ConstantProvider.prototype.createBlockStyle_ = function(
|
||||
colour) {
|
||||
return this.validatedBlockStyle_({
|
||||
colourPrimary: colour
|
||||
'colourPrimary': colour
|
||||
});
|
||||
};
|
||||
|
||||
@@ -619,7 +619,6 @@ Blockly.blockRendering.ConstantProvider.prototype.validatedBlockStyle_ =
|
||||
if (blockStyle) {
|
||||
Blockly.utils.object.mixin(valid, blockStyle);
|
||||
}
|
||||
|
||||
// Validate required properties.
|
||||
var parsedColour = Blockly.utils.parseBlockColour(
|
||||
valid['colourPrimary'] || '#000');
|
||||
@@ -627,7 +626,7 @@ Blockly.blockRendering.ConstantProvider.prototype.validatedBlockStyle_ =
|
||||
valid.colourSecondary = valid['colourSecondary'] ?
|
||||
Blockly.utils.parseBlockColour(valid['colourSecondary']).hex :
|
||||
this.generateSecondaryColour_(valid.colourPrimary);
|
||||
valid.colourTertiary = valid.colourTertiary ?
|
||||
valid.colourTertiary = valid['colourTertiary'] ?
|
||||
Blockly.utils.parseBlockColour(valid['colourTertiary']).hex :
|
||||
this.generateTertiaryColour_(valid.colourPrimary);
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ tempPath="$BLOCKLY_ROOT/temp_core"
|
||||
corePath="$BLOCKLY_ROOT/core/*"
|
||||
mkdir $tempPath
|
||||
cp $corePath $tempPath
|
||||
|
||||
cp "$BLOCKLY_ROOT/tests/compile/test_blocks.js" "$tempPath/test_blocks.js"
|
||||
# Copy over all files in core and any subdirectories to the temp_core directory.
|
||||
for dir in "$corePath/" ; do
|
||||
# For all files in the directory and any subdirectories rename them to
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
<block type="math_arithmetic"></block>
|
||||
<block type="text"></block>
|
||||
<block type="text_print"></block>
|
||||
<block type="test_style_hex1"></block>
|
||||
</xml>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -31,6 +31,7 @@ goog.require('Blockly.Constants.Colour');
|
||||
goog.require('Blockly.Constants.Variables');
|
||||
goog.require('Blockly.Constants.VariablesDynamic');
|
||||
goog.require('Blockly.Blocks.procedures');
|
||||
goog.require('Blockly.TestBlocks')
|
||||
|
||||
Main.init = function() {
|
||||
Blockly.inject('blocklyDiv', {
|
||||
|
||||
Reference in New Issue
Block a user