We're getting there
This commit is contained in:
parent
23f74a3be3
commit
512bde6fd8
51 changed files with 1472 additions and 574 deletions
|
|
@ -66,7 +66,7 @@ require("./config").init();
|
|||
|
||||
/**
|
||||
* Ace.edit(el) -> Editor
|
||||
* - el (String | Element): Either the id of an element, or the element itself
|
||||
* - el (String | DOMElement): Either the id of an element, or the element itself
|
||||
*
|
||||
* This method embeds the Ace editor into the DOM, at the element provided by `el`.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ var BackgroundTokenizer = function(tokenizer, editor) {
|
|||
|
||||
/**
|
||||
* BackgroundTokenizer.setTokenizer(tokenizer) -> Void
|
||||
* - tokenizer (Tokenizier): The new tokenizer to use
|
||||
* - tokenizer (Tokenizer): The new tokenizer to use
|
||||
*
|
||||
* Sets a new tokenizer for this object.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -390,7 +390,7 @@ var Document = function(text) {
|
|||
};
|
||||
|
||||
/**
|
||||
* Document.insertInLine(position, text) -> Object | Integer
|
||||
* Document.insertInLine(position, text) -> Object | Number
|
||||
* - position (Number): The position to insert at
|
||||
* - text (String): A chunk of text
|
||||
*
|
||||
|
|
|
|||
|
|
@ -365,7 +365,7 @@ var EditSession = function(text, mode) {
|
|||
/**
|
||||
* EditSession.getTabString() -> String
|
||||
*
|
||||
* Returns the current value for tabs. If the user is using soft tabs, this will be a series of spaces (defined by [[getTabSize `getTabSize()`]]); otherwise it's simply `'\t'`.
|
||||
* Returns the current value for tabs. If the user is using soft tabs, this will be a series of spaces (defined by [[EditSession.getTabSize `getTabSize()`]]); otherwise it's simply `'\t'`.
|
||||
**/
|
||||
this.getTabString = function() {
|
||||
if (this.getUseSoftTabs()) {
|
||||
|
|
@ -635,7 +635,7 @@ var EditSession = function(text, mode) {
|
|||
* EditSession.$detectNewLine(text) -> Void
|
||||
* - text (String): A block of text
|
||||
*
|
||||
* If `text` contains either the newline (`\n`) or carriage-return ('\r') characters, [[autoNewLine `autoNewLine`]] stores that value.
|
||||
* If `text` contains either the newline (`\n`) or carriage-return ('\r') characters, `$autoNewLine` stores that value.
|
||||
*
|
||||
**/
|
||||
this.$detectNewLine = function(text) {
|
||||
|
|
@ -1288,7 +1288,7 @@ var EditSession = function(text, mode) {
|
|||
*
|
||||
* Indents all the rows, from `startRow` to `endRow` (inclusive), by prefixing each row with the token in `indentString`.
|
||||
*
|
||||
* If `indentString` contains the `'\t'` character, it's replaced by whatever is defined by [[getTabString `getTabString()`]].
|
||||
* If `indentString` contains the `'\t'` character, it's replaced by whatever is defined by [[EditSession.getTabString `getTabString()`]].
|
||||
*
|
||||
**/
|
||||
this.indentRows = function(startRow, endRow, indentString) {
|
||||
|
|
@ -1923,8 +1923,8 @@ var EditSession = function(text, mode) {
|
|||
/** internal
|
||||
* EditSession.$getStringScreenWidth(str, maxScreenColumn, screenColumn) -> Array
|
||||
* - str (String): The string to calculate the screen width of
|
||||
* - maxScreenColumn (Integer):
|
||||
* - screenColumn (Integer):
|
||||
* - maxScreenColumn (Number):
|
||||
* - screenColumn (Number):
|
||||
*
|
||||
* Calculates the width of the string `str` on the screen while assuming that the string starts at the first column on the screen.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -60,6 +60,15 @@ var TokenIterator = require("../token_iterator").TokenIterator;
|
|||
**/
|
||||
function BracketMatch() {
|
||||
|
||||
/**
|
||||
* new findMatchingBracket(position)
|
||||
* - position (Number): Identifier for the platform; must be either `'mac'` or `'win'`
|
||||
* - commands (Array): A list of commands
|
||||
*
|
||||
* TODO
|
||||
*
|
||||
*
|
||||
**/
|
||||
this.findMatchingBracket = function(position) {
|
||||
if (position.column == 0) return null;
|
||||
|
||||
|
|
|
|||
|
|
@ -330,7 +330,7 @@ var Editor = function(renderer, session) {
|
|||
/**
|
||||
* Editor.focus() -> Void
|
||||
*
|
||||
* Brings the current [[textInput `textInput`]] into focus.
|
||||
* Brings the current `textInput` into focus.
|
||||
**/
|
||||
this.focus = function() {
|
||||
// Safari needs the timeout
|
||||
|
|
@ -346,7 +346,7 @@ var Editor = function(renderer, session) {
|
|||
/**
|
||||
* Editor.isFocused() -> Boolean
|
||||
*
|
||||
* Returns true if the current [[textInput `textInput`]] is in focus.
|
||||
* Returns true if the current `textInput` is in focus.
|
||||
**/
|
||||
this.isFocused = function() {
|
||||
return this.textInput.isFocused();
|
||||
|
|
@ -355,7 +355,7 @@ var Editor = function(renderer, session) {
|
|||
/**
|
||||
* Editor.blur() -> Void
|
||||
*
|
||||
* Blurs the current [[textInput `textInput`]].
|
||||
* Blurs the current `textInput`.
|
||||
**/
|
||||
this.blur = function() {
|
||||
this.textInput.blur();
|
||||
|
|
@ -767,7 +767,7 @@ var Editor = function(renderer, session) {
|
|||
|
||||
/**
|
||||
* Editor.setScrollSpeed(speed) -> Void
|
||||
* - speed (Integer): A value indicating the new speed
|
||||
* - speed (Number): A value indicating the new speed
|
||||
*
|
||||
* Sets how fast the mouse scrolling should do.
|
||||
*
|
||||
|
|
@ -1652,7 +1652,7 @@ var Editor = function(renderer, session) {
|
|||
this.selection.moveCursorToPosition(pos);
|
||||
};
|
||||
|
||||
/** related to: EditSession.findMatchingBracket
|
||||
/**
|
||||
* Editor.jumpToMatching() -> Void
|
||||
*
|
||||
* Moves the cursor's row and column to the next matching bracket.
|
||||
|
|
|
|||
|
|
@ -318,7 +318,7 @@ var Editor = require("./editor").Editor;
|
|||
|
||||
/**
|
||||
* Editor.removeSelectionMarker(range) -> Void
|
||||
* - range (Range): The selection range added with [[addSelectionMarker `addSelectionMarker()`]].
|
||||
* - range (Range): The selection range added with [[Editor.addSelectionMarker `addSelectionMarker()`]].
|
||||
*
|
||||
* Removes the selection marker.
|
||||
**/
|
||||
|
|
|
|||
|
|
@ -140,7 +140,7 @@ var PlaceHolder = function(session, length, pos, others, mainClass, othersClass)
|
|||
/**
|
||||
* PlaceHolder.hideOtherMarkers() -> Void
|
||||
*
|
||||
* Hides all over markers in the [[EditSesssion `EditSession`]] that are not the currently selected one.
|
||||
* Hides all over markers in the [[EditSession `EditSession`]] that are not the currently selected one.
|
||||
*
|
||||
**/
|
||||
this.hideOtherMarkers = function() {
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ var EventEmitter = require("./lib/event_emitter").EventEmitter;
|
|||
|
||||
/**
|
||||
* new ScrollBar(parent)
|
||||
* - parent (Element): A DOM element
|
||||
* - parent (DOMElement): A DOM element
|
||||
*
|
||||
* Creates a new `ScrollBar`. `parent` is the owner of the scroll bar.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ var Selection = function(session) {
|
|||
return this.selectionAnchor.getPosition();
|
||||
};
|
||||
|
||||
/** related to: Lead.getPosition
|
||||
/**
|
||||
* Selection.getSelectionLead() -> Object
|
||||
*
|
||||
* Returns an object containing the `row` and `column` of the calling selection lead.
|
||||
|
|
|
|||
|
|
@ -227,7 +227,7 @@ var Split = function(container, theme, splits) {
|
|||
this.$editors.forEach(callback, scope);
|
||||
};
|
||||
|
||||
/** related to: editor.setFontSize
|
||||
/** related to: Editor.setFontSize
|
||||
* Split.setFontSize(size) -> Void
|
||||
* - size (Number): The new font size
|
||||
*
|
||||
|
|
@ -269,7 +269,7 @@ var Split = function(container, theme, splits) {
|
|||
return s;
|
||||
};
|
||||
|
||||
/** related to: editor.setSession
|
||||
/** related to: Editor.setSession
|
||||
* Split.setSession(session, idx) -> Void
|
||||
* - session (EditSession): The new edit session
|
||||
* - idx (Number): The editor's index you're interested in
|
||||
|
|
|
|||
|
|
@ -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