mirror of
https://github.com/atom/atom.git
synced 2026-01-14 17:38:03 -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 () {
|
||||
|
||||
@@ -3,6 +3,7 @@ atom-text-editor {
|
||||
|
||||
.scroll-view {
|
||||
position: absolute;
|
||||
contain: strict;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
|
||||
Reference in New Issue
Block a user