Skip to content

Commit 072e615

Browse files
committed
(fix): clear w/ same bg color on resize
- before it would always turn white on resize - no need to clear on componentDidMount anymore since resize clears now
1 parent bc9e2e6 commit 072e615

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ export default class SignatureCanvas extends Component {
3434
componentDidMount () {
3535
this._sigPad = new SignaturePad(this._canvas, this._excludeOurProps())
3636
this._resizeCanvas();
37-
this.clear()
3837
this.on()
3938
}
4039

@@ -94,6 +93,7 @@ export default class SignatureCanvas extends Component {
9493
}
9594
if(!width || !height) {
9695
canvas.getContext('2d').scale(ratio, ratio)
96+
this.clear()
9797
}
9898
}
9999

0 commit comments

Comments
 (0)