mirror of
https://github.com/scratchfoundation/scratch-paint.git
synced 2024-12-23 05:52:42 -05:00
allow transparent paintbrush
This commit is contained in:
parent
80b4557741
commit
887f528b0a
2 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue