mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Delegate get/setFirstVisibleScreenColumn from the model to the component
This commit is contained in:
committed by
Antonio Scandurra
parent
4f52637518
commit
eb7cdf2a34
@@ -2325,6 +2325,14 @@ class TextEditorComponent {
|
||||
)
|
||||
}
|
||||
|
||||
getFirstVisibleColumn () {
|
||||
return Math.floor(this.getScrollLeft() / this.getBaseCharacterWidth())
|
||||
}
|
||||
|
||||
setFirstVisibleColumn (column) {
|
||||
this.setScrollLeft(column * this.getBaseCharacterWidth())
|
||||
}
|
||||
|
||||
getVisibleTileCount () {
|
||||
return Math.floor((this.getLastVisibleRow() - this.getFirstVisibleRow()) / this.getRowsPerTile()) + 2
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user