mirror of
https://github.com/atom/atom.git
synced 2026-01-26 15:28:27 -05:00
Translate gutter so it remains visible when scrolling to the right
Signed-off-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
This commit is contained in:
committed by
Antonio Scandurra
parent
d2d560eac6
commit
9765d9dbcd
@@ -51,9 +51,18 @@ class TextEditorComponent {
|
||||
}
|
||||
|
||||
renderGutterContainer () {
|
||||
return $.div({className: 'gutter-container'},
|
||||
this.renderLineNumberGutter()
|
||||
)
|
||||
const props = {className: 'gutter-container'}
|
||||
|
||||
if (this.measurements) {
|
||||
props.style = {
|
||||
position: 'relative',
|
||||
willChange: 'transform',
|
||||
transform: `translateX(${this.measurements.scrollLeft}px)`,
|
||||
zIndex: 1
|
||||
}
|
||||
}
|
||||
|
||||
return $.div(props, this.renderLineNumberGutter())
|
||||
}
|
||||
|
||||
renderLineNumberGutter () {
|
||||
|
||||
Reference in New Issue
Block a user