mirror of
https://github.com/google/blockly.git
synced 2025-12-15 22:00:07 +01:00
Migrate Blockly.hueToHex to Blockly.utils.colour.hueToHex (#5462)
* Move hueToHex to core/utils/colour.js * Mark Blockly.hueToHex as deprecated and pass calls through to Blockly.utils.colour.hueToHex * Migrate core to use Blockly.utils.colour.hueToHex * Migrate demos to use Blockly.utils.colour.hueToHex
This commit is contained in:
@@ -590,7 +590,8 @@ WorkspaceFactoryController.prototype.loadCategoryByName = function(name) {
|
||||
}
|
||||
if (!standardCategory.colour && standardCategory.hue !== undefined) {
|
||||
// Calculate the hex colour based on the hue.
|
||||
standardCategory.colour = Blockly.hueToHex(standardCategory.hue);
|
||||
standardCategory.colour = Blockly.utils.colour.hueToHex(
|
||||
standardCategory.hue);
|
||||
}
|
||||
// Transfers current flyout blocks to a category if it's the first category
|
||||
// created.
|
||||
|
||||
@@ -52,7 +52,7 @@ WorkspaceFactoryInit.initColourPicker_ = function(controller) {
|
||||
// Convert hue numbers to RRGGBB strings.
|
||||
for (var i = 0; i < colours.length; i++) {
|
||||
if (colours[i] !== '') {
|
||||
colours[i] = Blockly.hueToHex(colours[i]).substring(1);
|
||||
colours[i] = Blockly.utils.colour.hueToHex(colours[i]).substring(1);
|
||||
}
|
||||
}
|
||||
// Convert to 2D array.
|
||||
|
||||
Reference in New Issue
Block a user