mirror of
https://github.com/google/blockly.git
synced 2025-12-16 14:20:10 +01:00
fix: Correct errors in HSV_SATURATION, HSV_VALUE accessors (#7297)
* fix: Correct errors in HSV_SATURATION, HSV_VALUE accessors Fix the comment / message errors noted in https://github.com/google/blockly/pull/7249#issuecomment-1638645810 * chore: Add renamings for HSV_SATURATION, HSV_VALUE
This commit is contained in:
committed by
GitHub
parent
d503fbb409
commit
1bc4f67d78
14
core/main.js
14
core/main.js
@@ -32,8 +32,8 @@ Object.defineProperties(Blockly, {
|
||||
* Must be in the range of 0 (inclusive) to 1 (exclusive).
|
||||
* @name Blockly.HSV_SATURATION
|
||||
* @type {number}
|
||||
* @deprecated Use Blockly.colour.getHsvSaturation() / .setHsvSaturation(
|
||||
* instead. (July 2023)
|
||||
* @deprecated Use Blockly.utils.colour.getHsvSaturation() /
|
||||
* .setHsvSaturation() instead. (July 2023)
|
||||
* @suppress {checkTypes}
|
||||
*/
|
||||
HSV_SATURATION: {
|
||||
@@ -42,7 +42,7 @@ Object.defineProperties(Blockly, {
|
||||
'Blockly.HSV_SATURATION',
|
||||
'version 10',
|
||||
'version 11',
|
||||
'Blockly.colour.getHsvSaturation()'
|
||||
'Blockly.utils.colour.getHsvSaturation()'
|
||||
);
|
||||
return colour.getHsvSaturation();
|
||||
},
|
||||
@@ -51,7 +51,7 @@ Object.defineProperties(Blockly, {
|
||||
'Blockly.HSV_SATURATION',
|
||||
'version 10',
|
||||
'version 11',
|
||||
'Blockly.colour.setHsvSaturation()'
|
||||
'Blockly.utils.colour.setHsvSaturation()'
|
||||
);
|
||||
colour.setHsvSaturation(newValue);
|
||||
},
|
||||
@@ -61,7 +61,7 @@ Object.defineProperties(Blockly, {
|
||||
* Must be in the range of 0 (inclusive) to 1 (exclusive).
|
||||
* @name Blockly.HSV_VALUE
|
||||
* @type {number}
|
||||
* @deprecated Use Blockly.colour.getHsvValue() / .setHsvValue instead.
|
||||
* @deprecated Use Blockly.utils.colour.getHsvValue() / .setHsvValue instead.
|
||||
* (July 2023)
|
||||
* @suppress {checkTypes}
|
||||
*/
|
||||
@@ -71,7 +71,7 @@ Object.defineProperties(Blockly, {
|
||||
'Blockly.HSV_VALUE',
|
||||
'version 10',
|
||||
'version 11',
|
||||
'Blockly.colour.getHsvValue()'
|
||||
'Blockly.utils.colour.getHsvValue()'
|
||||
);
|
||||
return colour.getHsvValue();
|
||||
},
|
||||
@@ -80,7 +80,7 @@ Object.defineProperties(Blockly, {
|
||||
'Blockly.HSV_VALUE',
|
||||
'version 10',
|
||||
'version 11',
|
||||
'Blockly.colour.setHsvValue()'
|
||||
'Blockly.utils.colour.setHsvValue()'
|
||||
);
|
||||
colour.setHsvValue(newValue);
|
||||
},
|
||||
|
||||
@@ -1577,5 +1577,23 @@
|
||||
},
|
||||
],
|
||||
|
||||
'10.0.1': [
|
||||
{
|
||||
oldName: 'Blockly',
|
||||
exports: {
|
||||
HSV_SATURATION: {
|
||||
newModule: 'Blockly.utils.colour',
|
||||
getMethod: 'getHsvSaturation',
|
||||
setMethod: 'setHsvSaturation',
|
||||
},
|
||||
HSV_VALUE: {
|
||||
newModule: 'Blockly.utils.colour',
|
||||
getMethod: 'getHsvValue',
|
||||
setMethod: 'setHsvValue',
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
|
||||
'develop': [],
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user