diff --git a/CHANGELOG.md b/CHANGELOG.md index a74072d8..dee662c5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,9 @@ - scripting - add `setFocus` function to focus an input widget programmatically +- misc + - add `usePercents` client option + # 1.8.9 - bug fixes diff --git a/resources/docs/docs/client-options.md b/resources/docs/docs/client-options.md index 89b712d1..83f47f70 100644 --- a/resources/docs/docs/client-options.md +++ b/resources/docs/docs/client-options.md @@ -12,6 +12,8 @@ Client options can be set either with the server's `--client-options` option, or | lang | string | *system_default* | use a different language than the default if available (available languages: en, fr) | | consoleLength | number | 300 | sets the maximum number of log messages in the client's console | | id | string | *random_id* | client's unique id (use with caution: two clients should never have the same id) | +| usePercents | 1 / 0 | 0 | sets the editor's "relative units" option | + Example: diff --git a/src/client/editor/index.js b/src/client/editor/index.js index 6820b395..8b4a8e20 100644 --- a/src/client/editor/index.js +++ b/src/client/editor/index.js @@ -130,7 +130,7 @@ class Editor { this.idClipboard = data.idClipboard }) - this.usePercents = false + this.usePercents = !!ENV.usePercents this.enabled = false this.grid = true