Skip to content

Commit e8e971a

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 fe1cf7a commit e8e971a

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
@@ -38,7 +38,6 @@ export default class SignatureCanvas extends Component {
3838
this._handleMouseEvents();
3939
this._handleTouchEvents();
4040
this._resizeCanvas();
41-
this.clear()
4241
}
4342

4443
componentWillUnmount() {
@@ -113,6 +112,7 @@ export default class SignatureCanvas extends Component {
113112
}
114113
if(!width || !height) {
115114
ctx.scale(ratio, ratio)
115+
this.clear()
116116
}
117117
}
118118

0 commit comments

Comments
 (0)