Warn on set or change unknown color parameter

This commit is contained in:
Eric Rosenbaum 2017-10-18 11:33:25 -04:00
parent aab1b834d6
commit b5ad5e1f6b

View file

@ -5,7 +5,7 @@ const Clone = require('../util/clone');
const Color = require('../util/color'); const Color = require('../util/color');
const MathUtil = require('../util/math-util'); const MathUtil = require('../util/math-util');
const RenderedTarget = require('../sprites/rendered-target'); const RenderedTarget = require('../sprites/rendered-target');
const log = require('../util/log');
/** /**
* Enum for pen color parameters. * Enum for pen color parameters.
@ -431,6 +431,9 @@ class Scratch3PenBlocks {
case ColorParam.TRANSPARENCY: case ColorParam.TRANSPARENCY:
penState.transparency = this._clampColorParam(value + (change ? penState.transparency : 0)); penState.transparency = this._clampColorParam(value + (change ? penState.transparency : 0));
break; break;
default:
log.warn(`Tried to set or change unknown color parameter: ${param}`);
} }
this._updatePenColor(penState); this._updatePenColor(penState);
} }