We're getting there
This commit is contained in:
parent
23f74a3be3
commit
512bde6fd8
51 changed files with 1472 additions and 574 deletions
|
|
@ -484,7 +484,7 @@ var VirtualRenderer = function(container, theme) {
|
|||
|
||||
/**
|
||||
* VirtualRenderer.moveTextAreaToCursor(textarea) -> Void
|
||||
* - textarea (Element): A text area to work with
|
||||
* - textarea (DOMElement): A text area to work with
|
||||
*
|
||||
* Changes the position of `textarea` to where the cursor is pointing.
|
||||
**/
|
||||
|
|
@ -960,12 +960,19 @@ var VirtualRenderer = function(container, theme) {
|
|||
* VirtualRenderer.scrollToRow(row) -> Void
|
||||
* - row (Number): A row id
|
||||
*
|
||||
* Sets the top of the editor to the row indicated.
|
||||
* Gracefully scrolls the top of the editor to the row indicated.
|
||||
**/
|
||||
this.scrollToRow = function(row) {
|
||||
this.session.setScrollTop(row * this.lineHeight);
|
||||
};
|
||||
|
||||
/**
|
||||
* VirtualRenderer.scrollToLine(line, center) -> Void
|
||||
* - line (Number): A line number
|
||||
* - center (Boolean): If `true`, centers the editor the to indicated line
|
||||
*
|
||||
* Gracefully scrolls the editor to the row indicated.
|
||||
**/
|
||||
this.scrollToLine = function(line, center) {
|
||||
var pos = this.$cursorLayer.getPixelPosition({row: line, column: 0});
|
||||
var offset = pos.top;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue