Skip to content

Commit 1866584

Browse files
committed
(fix): clear w/ same bg color on resize
backport of v1.0.1 addition from 072e615 - before it would always turn white on resize - no need to clear on componentDidMount anymore since resize clears now
1 parent a74ad55 commit 1866584

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
@@ -37,7 +37,6 @@ export default class SignatureCanvas extends Component {
3737

3838
this.on()
3939
this._resizeCanvas();
40-
this.clear()
4140
}
4241

4342
componentWillUnmount() {
@@ -112,6 +111,7 @@ export default class SignatureCanvas extends Component {
112111
}
113112
if(!width || !height) {
114113
ctx.scale(ratio, ratio)
114+
this.clear()
115115
}
116116
}
117117

0 commit comments

Comments
 (0)