Skip to content

Latest commit

 

History

History
220 lines (185 loc) · 5.82 KB

custom-settings.md

File metadata and controls

220 lines (185 loc) · 5.82 KB

Custom settings

Русская версия здесь.

A list of all the parameters that can be specified when creating a utility instance.

Parameters must be passed through the object, for example:

const UduJS = require('udujs/Client');
const Debug = new UduJS({
  maxWidth: 'auto',
  fontSize: '1.2em',
  decimalPlaces: 4,
  popupColorScheme: 'dark',
});

horizontalPosition string | client only

Horizontal position of pop-up message on the browser window. Valid values are left or right. The default value is left.

const Debug = new UduJS({
  horizontalPosition: 'right',
});

verticalPosition string | client only

Vertical position of pop-up message on the browser window. Valid values are top or bottom. The default value is bottom.

const Debug = new UduJS({
  verticalPosition: 'top',
});

maxWidth number, string | client only

The maximum width of the pop-up message. Valid values are number or auto. The default value is 500.

const Debug = new UduJS({
  maxWidth: 'auto',
});

maxHeight number | client only

The maximum height of the pop-up message. Valid value are number. The default value is 600.

const Debug = new UduJS({
  maxHeight: 400,
});

fontSize string | client only

The font size in the pop-up message. Valid value are string. The default value is 1em.

const Debug = new UduJS({
  fontSize: '2em',
});

showClearTitle boolean | client only

The "Click to clear" tooltip on the pop-up message. If annoying, then you can turn it off. Valid values are true or false. The default value is true.

const Debug = new UduJS({
  showClearTitle: false,
});

showOutputDirection string | client only

Output direction for the show() method. Valid values are window or console. The default value is window.

const Debug = new UduJS({
  showOutputDirection: 'console',
});

allowColorization boolean | client only

Allow coloring of the displayed information. This parameter is applicable only to the console on the browser. Turn it off if the browser does not correctly color the text in the console. Valid values are true or false. The default value is true.

const Debug = new UduJS({
  allowColorization: false,
});

consoleColorScheme string | client only

The color scheme for the console in the browser. Valid values are dark, bright or custom. The default value is dark.

const Debug = new UduJS({
  consoleColorScheme: 'bright',
});

popupColorScheme string | client only

The color scheme for a pop-up message in the browser. Valid values are dark, bright or custom. The default value is bright.

const Debug = new UduJS({
  popupColorScheme: 'dark',
});

serverColorScheme string | server only

The color scheme for the console on the server. Valid values are dark, bright or custom. The default value is dark.

const Debug = new UduJS({
  serverColorScheme: 'custom',
});

consoleEOL string

A newline character for messages in the console. Recommended values: \r\n - Windows-style, \n - Linux-style. Valid value are string. The default value is \n.

const Debug = new UduJS({
  consoleEOL: '\r\n',
});

tabChar string

The size of one tab character for formatting messages. Step of indent for nested data structures. Valid value are string. The default is two space characters.

const Debug = new UduJS({
  tabChar: '..',
});

decimalPlaces number

The number of decimal places for displaying the execution time in RTT-methods (accuracy of measurement). Specify 0 to disable the decimal part. Valid value are number. The default value is 2.

const Debug = new UduJS({
  decimalPlaces: 4,
});

run boolean

This parameter allows you to quickly disable all components of the utility. Valid values are true or false. The default value is true.

const Debug = new UduJS({
  run: false,
});