To create complex and feature-rich components, you need to enter complex formulas instead of simple variables. You can use functions anywhere you like: inside animations, instead of constants, or as a text replacement in the text fields.
Formulas are evaluated with JavaScript, so you can enter any formula that is a valid JavaScript expression. You can also include any of the Component Variables that you have defined.
To show the functionality, we will extend our example by implementing the scale along the slide bar we have just created.
For each text field we need to specify the Text in the Replacement in the Rep. tab:
The left text field will show the value of the variable min.toFixed(x), which is a function that rounds the result to x decimal places. In our case, the value will be formatted to show one decimal place.
The second text field from the left should show 1/3 of the scale; therefore, we have used the formula min+(min+max)/3 to get 1/3 of the scale. We will use the toFixed(1) function to round the result.
The other two text fields are similar to those two; we can add units and a label to our component to finish:
To use the Label and Units text fields, we need to create two new variables. Both will be of the type ‘string’. The first variable will be named label, and the second will be named unit. For the text field label, add Text Replacement equal to the variable label. For Units text field, add Text Replacement equal to variable units. Finally, click on the Save button to see the changes.
Vídeňská 186/118
619 00 Brno
Česká republika
IČO: 276 52 203
DIČ: CZ27652203
We often send out our newsletter with news and great offers. We will never disclose your data to third parties and you can unsubscribe from the newsletter at any time.
Unfortunately, we’re unable to offer free samples. As a retailer, we buy all magazines from their publishers at the regular trade price. However, you could contact the magazine’s publisher directly to ask if they can send you a free copy.
You can create a new account at the end of the order process or on the following page. You can view all of your orders and subscriptions in your customer account. You can also change your addresses and your password.
No, you don’t have to create an account. But there are a few advantages if you create an account.
You never have to enter your billing and shipping address again
Find all of your orders, subscriptions and addresses in your account
Download invoices of your orders
No, we don’t have a physical store location at the moment. We accept only orders through our online shop and we’re shipping all orders with the Swiss Post Service. Please visit our shipping section for more details.
From time to time you will find us at design fairs and popup markets in Switzerland. Subscribe to our newsletter and you’ll receive the latest news.
Pro zobrazení tohoto formuláře se musíte přihlásit.
Zadejte svůj e-mail, na který vám zašleme odkaz pro obnovení hesla.
We often send out our newsletter with news and great offers. We will never disclose your data to third parties and you can unsubscribe from the newsletter at any time.
Unfortunately, we’re unable to offer free samples. As a retailer, we buy all magazines from their publishers at the regular trade price. However, you could contact the magazine’s publisher directly to ask if they can send you a free copy.
You can create a new account at the end of the order process or on the following page. You can view all of your orders and subscriptions in your customer account. You can also change your addresses and your password.
No, you don’t have to create an account. But there are a few advantages if you create an account.
You never have to enter your billing and shipping address again
Find all of your orders, subscriptions and addresses in your account
Download invoices of your orders
No, we don’t have a physical store location at the moment. We accept only orders through our online shop and we’re shipping all orders with the Swiss Post Service. Please visit our shipping section for more details.
From time to time you will find us at design fairs and popup markets in Switzerland. Subscribe to our newsletter and you’ll receive the latest news.