Parameters#

Parameters are variables which can be set by interactive widgets (i.e. Buttons), the REST API or plugins. All parameters are described by their Props und can be changed Actions correspondig by their type. disco knows four types of parameters:

❗Parameters are only available in the Full edition of disco, NOT in the BASIC

Boolean#

Booleans are the most simple kind of parameter. the can only have two values: false and true.

Props#

defaultVal#

The defaultVal is the value the parameter will be initialized with, default is false.

Actions#

BOOLEAN_TOGGLE#

The action toogle the value of the parameter. When the value is false, the action will set it to true and vice versa.

UPDATE#

The action will set the value of the parameter to a concrete value.

Args#
val#

The val argument holds the value the parameter should be set to.

Number#

With the Number parameter type all kinds of numbers can be represented. the app does not distinguish between floats an integers.

Props#

defaultVal#

The defaultVal is the value the parameter will be initialized with, default is 0.

maximum#

The maximum is the maximum the parameter value can be set to. Trying to set it to a greater value will set the parameter value to the maximum.

minimum#

The minimum is the minimum the parameter value can be set to. Trying to set it to a lesser value will set the parameter value to the minimum.

multipleOf#

Number parameters can be restricted to a multiple of a given number, using the multipleOf prop. It may be set to any positive number.

Actions#

NUMBER_DEC#

The action will decrement the parameter value.

Args#
step#

The step argument holds the value the parameter should be decremented by, default is 1 or, if defined, the value of multipleOf .

NUMBER_INC#

The action will increment the parameter value.

Args#
step#

The step argument holds the value the parameter should be incremented by, default is 1 or, if defined, the value of multipleOf .

UPDATE#

The action will set the value of the parameter to a concrete value.

Args#
val#

The val argument holds the value the parameter should be set to.

Selector#

The Selector parameter type is complex. It consists of two parts, the index, which is an integer number and the items, which is an array of strings. The parameter value is a combination of both, it is string with index ìndex in the ìtems array. The parameter can not be set directly, only ba manipulating the index via actions.

Props#

defaultIndex#

The defaultIndex is the index the parameter will be initialized with, default is 0.

items#

The items array is a list of strings. they represent the possibilities the value of the parameter can be set to by manipulating the index via actions.

Actions#

SELECTOR_FIRST#

The action will set the index of the parameter to 0, so the value will be set to the first item of items.

SELECTOR_INDEX#

The action will set the index of the parameter to a concrete value.

Args#
index#

The index argument holds the index the parameter should be set to.

SELECTOR_LAST#

The action will set the index of the parameter to the length of items, so the value will be set to the last item of items.

SELECTOR_NEXT#

The action will increment the index of the parameter by 1. When the index cannot be incremented anymore, it starts with 0 again.

SELECTOR_PREV#

The action will decrement the index of the parameter by 1. When the index cannot be decremented anymore, it starts with length of maximal index again.

String#

With String parameter type all kinds of nubers can be represented. the app does not distinguish between floats an integers.

Props#

defaultVal#

The defaultVal is the value the parameter will be initialized with, default is false.

pattern#

The pattern can be used to restrict a string parameter to a particular regular expression.

Actions#

UPDATE#

The action will set the value of the parameter to a concrete value.

Args#
val#

The val argument holds the value the parameter should be set to.


Last update: March 12, 2020