DS Server

Javascript: RulerBarViewGenerator.resetDisplayColors Method

Method|Introduced in 30.0

Description

Resets all display colors of a ruler bar to their system dependent default values.

Syntax

<void> RulerBarViewGenerator.resetDisplayColors([<EmptyRequestCallback> callback], [<ErrorCallback> errorCallback])

Parameters

ParameterDescription
callback

Optional. Is called when the operation completed.

errorCallback

Optional. Is called when the operation failed with an error.

Examples

The following example demonstrates RulerBarViewGenerator.resetDisplayColors in a practical document-editing workflow. Resets all display colors of a ruler bar to their system dependent default values.

function onTxError(error) {
    console.error("TX Text Control error:", error.msg);
    error.handled = true;
}

TXTextControl.rulerBar.resetDisplayColors(
    function() {
        console.log("reset display colors completed.");
    },
    onTxError
);