mirror of
https://github.com/atom/atom.git
synced 2026-01-14 17:38:03 -05:00
Add missing methods on TextEditorElement
This commit is contained in:
committed by
Antonio Scandurra
parent
44539b1dc6
commit
b54dbb58ab
@@ -142,10 +142,27 @@ class TextEditorElement extends HTMLElement {
|
||||
getBaseCharacterWidth () {
|
||||
return this.getComponent().getBaseCharacterWidth()
|
||||
}
|
||||
|
||||
getMaxScrollTop () {
|
||||
return this.getComponent().getMaxScrollTop()
|
||||
}
|
||||
|
||||
getScrollHeight () {
|
||||
return this.getComponent().getScrollHeight()
|
||||
}
|
||||
|
||||
getScrollWidth () {
|
||||
return this.getComponent().getScrollWidth()
|
||||
}
|
||||
|
||||
getVerticalScrollbarWidth () {
|
||||
return this.getComponent().getVerticalScrollbarWidth()
|
||||
}
|
||||
|
||||
getHorizontalScrollbarHeight () {
|
||||
return this.getComponent().getHorizontalScrollbarHeight()
|
||||
}
|
||||
|
||||
getScrollTop () {
|
||||
return this.getComponent().getScrollTop()
|
||||
}
|
||||
@@ -156,6 +173,14 @@ class TextEditorElement extends HTMLElement {
|
||||
component.scheduleUpdate()
|
||||
}
|
||||
|
||||
getScrollBottom () {
|
||||
return this.getComponent().getScrollBottom()
|
||||
}
|
||||
|
||||
setScrollBottom (scrollBottom) {
|
||||
return this.getComponent().setScrollBottom(scrollBottom)
|
||||
}
|
||||
|
||||
getScrollLeft () {
|
||||
return this.getComponent().getScrollLeft()
|
||||
}
|
||||
@@ -166,6 +191,24 @@ class TextEditorElement extends HTMLElement {
|
||||
component.scheduleUpdate()
|
||||
}
|
||||
|
||||
getScrollRight () {
|
||||
return this.getComponent().getScrollRight()
|
||||
}
|
||||
|
||||
setScrollRight (scrollRight) {
|
||||
return this.getComponent().setScrollRight(scrollRight)
|
||||
}
|
||||
|
||||
// Essential: Scrolls the editor to the top.
|
||||
scrollToTop () {
|
||||
this.setScrollTop(0)
|
||||
}
|
||||
|
||||
// Essential: Scrolls the editor to the bottom.
|
||||
scrollToBottom () {
|
||||
this.setScrollTop(Infinity)
|
||||
}
|
||||
|
||||
hasFocus () {
|
||||
return this.getComponent().focused
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user