Javascript: InputPosition.ScrollPosition Enumeration
Description
Determines a position to where the input position is scrolled.
Members
| Member | Description |
|---|---|
| Auto | Scrolls the current input position into the visible part of the document using a default position depending on the previous position. |
| Left | Scrolls the input position to the left side of the visible portion of the document |
| Right | Scrolls the input position to the right side of the visible portion of the document. |
| Top | Scrolls the input position to the top of the visible portion of the document. |
| Bottom | Scrolls the input position to the bottom of the visible portion of the document. |
Examples
The following example uses TXTextControl.Inputposition.ScrollPosition.Auto (scrolls the current input position into the visible part of the document using a default position depending on the previous position.) in a document-editing workflow.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
TXTextControl.footnotes.elementAt(0, function(footnote) {
if (!footnote) {
console.warn("No footnote is available.");
return;
}
footnote.scrollToPosition(
TXTextControl.Inputposition.ScrollPosition.Auto,
function() {
console.log("scroll to position completed.");
},
onTxError
);
}, onTxError);