Update buffer-row and screen-row data fields on each line number node

This commit is contained in:
Antonio Scandurra
2017-07-05 11:12:48 +02:00
parent 942dd03bd0
commit bcaf655325
2 changed files with 17 additions and 1 deletions

View File

@@ -3167,8 +3167,10 @@ class LineNumberComponent {
}
update (props) {
const {nodePool, className, width, marginTop, number} = props
const {nodePool, className, width, marginTop, bufferRow, screenRow, number} = props
if (this.props.bufferRow !== bufferRow) this.element.dataset.bufferRow = bufferRow
if (this.props.screenRow !== screenRow) this.element.dataset.screenRow = screenRow
if (this.props.className !== className) this.element.className = className
if (this.props.width !== width) this.element.style.width = width + 'px'
if (this.props.marginTop !== marginTop) {