Skip to content

Commit 667f455

Browse files
authored
Merge pull request #34 from shafy/fix/backgroundcolor
fixed bug where if backgroundColors initial value was not set
2 parents e3b08d0 + 98d5d06 commit 667f455

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/SketchField.jsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -520,8 +520,9 @@ class SketchField extends PureComponent {
520520
let {
521521
tool,
522522
value,
523+
undoSteps,
523524
defaultValue,
524-
undoSteps
525+
backgroundColor
525526
} = this.props;
526527

527528
let canvas = this._fc = new fabric.Canvas(this._canvas/*, {
@@ -532,6 +533,9 @@ class SketchField extends PureComponent {
532533

533534
this._initTools(canvas);
534535

536+
// set initial backgroundColor
537+
this._backgroundColor(backgroundColor)
538+
535539
let selectedTool = this._tools[tool];
536540
selectedTool.configureCanvas(this.props);
537541
this._selectedTool = selectedTool;

0 commit comments

Comments
 (0)