diff --git a/HISTORY.md b/HISTORY.md index 5f977654..93fbe354 100755 --- a/HISTORY.md +++ b/HISTORY.md @@ -49,6 +49,9 @@ * German * Chinese, thanks, Simon! +### 2021-11-08 +* objects: renamed some internal color methods + ### 2021-11-07 * widgets, blocks, byob: allow block-instances to be dragged off from templates in the "hide blocks" dialog * gui: prevent switching to another sprite if a "hide blocks" dialog is open diff --git a/snap.html b/snap.html index 0a88f2aa..5817d84a 100755 --- a/snap.html +++ b/snap.html @@ -18,7 +18,7 @@ - + diff --git a/src/blocks.js b/src/blocks.js index 930a29a8..f46ea5c9 100644 --- a/src/blocks.js +++ b/src/blocks.js @@ -4727,7 +4727,7 @@ BlockMorph.prototype.mouseClickLeft = function () { shiftClicked = this.world().currentKey === 16, stage; if (shiftClicked && !this.isTemplate) { - return this.selectForEdit().focus(); // enable coopy-on-edit + return this.selectForEdit().focus(); // enable copy-on-edit } if (top instanceof PrototypeHatBlockMorph) { return; // top.mouseClickLeft(); diff --git a/src/objects.js b/src/objects.js index 454f2da9..272eb4b0 100644 --- a/src/objects.js +++ b/src/objects.js @@ -87,7 +87,7 @@ BlockVisibilityDialogMorph*/ /*jshint esversion: 6*/ -modules.objects = '2021-October-29'; +modules.objects = '2021-November-08'; var SpriteMorph; var StageMorph; @@ -4442,7 +4442,7 @@ SpriteMorph.prototype.setColorComponentHSVA = function (idx, num) { this.gotoXY(x, y); }; -SpriteMorph.prototype.getColorComponentHSLA = function (idx) { +SpriteMorph.prototype.getColorComponentHSVA = function (idx) { idx = +idx; if (idx === 3) { return (1 - this.color.a) * 100; @@ -4453,7 +4453,7 @@ SpriteMorph.prototype.getColorComponentHSLA = function (idx) { SpriteMorph.prototype.changeColorComponentHSVA = function (idx, delta) { this.setColorComponentHSVA( idx, - this.getColorComponentHSLA(idx) + (+delta || 0) + this.getColorComponentHSVA(idx) + (+delta || 0) ); }; @@ -4478,7 +4478,7 @@ SpriteMorph.prototype.getPenAttribute = function (attrib) { if (name === 'size') { return this.size || 0; } - return this.getColorComponentHSLA(options.indexOf(name)); + return this.getColorComponentHSVA(options.indexOf(name)); }; // SpriteMorph layers @@ -9283,8 +9283,8 @@ StageMorph.prototype.setColorComponentHSVA = function (idx, num) { this.rerender(); }; -StageMorph.prototype.getColorComponentHSLA - = SpriteMorph.prototype.getColorComponentHSLA; +StageMorph.prototype.getColorComponentHSVA + = SpriteMorph.prototype.getColorComponentHSVA; StageMorph.prototype.changeColorComponentHSVA = SpriteMorph.prototype.changeColorComponentHSVA;