Pass bufferRow and screenRow as numbers

This commit is contained in:
Ash Wilson
2018-07-25 08:21:55 -04:00
parent 291bf4d835
commit 2a1719f337

View File

@@ -3364,15 +3364,23 @@ class LineNumberGutterComponent {
if (this.props.onMouseDown == null) {
this.props.rootComponent.didMouseDownOnLineNumberGutter(event)
} else {
const {bufferRow, screenRow} = event.target.dataset
this.props.onMouseDown({bufferRow, screenRow})
const {bufferRowStr, screenRowStr} = event.target.dataset
this.props.onMouseDown({
bufferRow: parseInt(bufferRowStr, 10),
screenRow: parseInt(screenRowStr, 10),
domEvent: event
})
}
}
didMouseMove (event) {
if (this.props.onMouseMove != null) {
const {bufferRow, screenRow} = event.target.dataset
this.props.onMouseMove({bufferRow, screenRow})
const {bufferRowStr, screenRowStr} = event.target.dataset
this.props.onMouseDown({
bufferRow: parseInt(bufferRowStr, 10),
screenRow: parseInt(screenRowStr, 10),
domEvent: event
})
}
}
}