Skip to content

Commit a6fbaa4

Browse files
committed
(format): move more formatting to Standard style
backport of v1.0.1 addition from 2afaa4d - not putting in much effort to re-format code that is removed/replaced in v1.0.0 however - remove some semicolons - more funcs and ifs should have same spacing - fix some spacing around an assignment
1 parent 1866584 commit a6fbaa4

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/index.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,14 @@ export default class SignatureCanvas extends Component {
3333
}
3434

3535
componentDidMount () {
36-
this._ctx = this._canvas.getContext("2d");
36+
this._ctx = this._canvas.getContext('2d')
3737

3838
this.on()
39-
this._resizeCanvas();
39+
this._resizeCanvas()
4040
}
4141

42-
componentWillUnmount() {
43-
this.off();
42+
componentWillUnmount () {
43+
this.off()
4444
}
4545

4646
clear = () => {
@@ -100,7 +100,7 @@ export default class SignatureCanvas extends Component {
100100
/* When zoomed out to less than 100%, for some very strange reason,
101101
some browsers report devicePixelRatio as less than 1
102102
and only part of the canvas is cleared then. */
103-
let ratio = Math.max(window.devicePixelRatio || 1, 1)
103+
let ratio = Math.max(window.devicePixelRatio || 1, 1)
104104

105105
// only change width/height if none has been passed in as a prop
106106
if (!width) {
@@ -109,7 +109,7 @@ export default class SignatureCanvas extends Component {
109109
if (!height) {
110110
canvas.height = canvas.offsetHeight * ratio
111111
}
112-
if(!width || !height) {
112+
if (!width || !height) {
113113
ctx.scale(ratio, ratio)
114114
this.clear()
115115
}

0 commit comments

Comments
 (0)