fixed secondary color selection in vector paint editor

because I broke it earlier today. Geez, I just spent a whole hour
chasing this issue and I still don’t understand why this came up at all
:-/
upd4.2
Jens Mönig 2018-03-19 18:25:40 +01:00
rodzic d9edaa7ab6
commit cd63357bc9
1 zmienionych plików z 2 dodań i 3 usunięć

Wyświetl plik

@ -1274,15 +1274,14 @@ VectorPaintEditorMorph.prototype.populatePropertiesMenu = function () {
c.add(pc.constrain);
};
VectorPaintEditorMorph.prototype.selectColor = function (color, isSecondary) {
VectorPaintEditorMorph.prototype.selectColor = function (color, secondary) {
var myself = this,
isSecondary = secondary || this.paper.isShiftPressed(),
propertyName = (isSecondary ? 'secondary' : 'primary') + 'Color',
ni = newCanvas(this.propertiesControls[propertyName + 'Viewer'].extent()),
ctx = ni.getContext('2d'),
i, j;
if (!isSecondary) {isSecondary = this.paper.isShiftPressed(); }
this.paper.settings[(propertyName)] = color;
if (this.selection.length) {