allow transparent paintbrush

This commit is contained in:
DD Liu 2018-04-05 01:32:27 -04:00 committed by DD
parent 80b4557741
commit 887f528b0a
2 changed files with 2 additions and 2 deletions

View file

@ -45,7 +45,7 @@ class BitBrushMode extends React.Component {
clearSelection(this.props.clearSelectedItems);
// Force the default brush color if fill is MIXED or transparent
let color = this.props.color;
if (color === MIXED || color === null) {
if (color === MIXED) {
this.props.onChangeFillColor(DEFAULT_COLOR);
color = DEFAULT_COLOR;
}

View file

@ -24,7 +24,7 @@ class BrushTool extends paper.Tool {
this.size = 5;
}
setColor (color) {
this.color = color;
this.color = color ? color : new paper.Color(0, 0, 0, 0);
}
bresenhamLine (point1, point2, callback){
// Fast Math.floor