diff --git a/resources/docs/docs/widgets/properties-reference.md b/resources/docs/docs/widgets/properties-reference.md index f3f13664..40f89008 100644 --- a/resources/docs/docs/widgets/properties-reference.md +++ b/resources/docs/docs/widgets/properties-reference.md @@ -762,8 +762,8 @@ | property | type |default | description | | --- | --- | --- | --- | |
valueLength#
| `number` | 1 | Defines the number of values accepted by the widget (minimum 1). Incoming messages that don't comply will be ignored

When calling `set()` from a script, submitted value should be an array only if `valueLength` is greater than 1. | - |
autoClear#
| `boolean` | true | If set to `false`, the canvas context won't be cleared automatically and `ctx.clear` will need to be called in `draw`. | - |
continuous#
| `boolean`|
`number` | false | If set to `true`, `draw` will be called at each frame, otherwise it will be called only when the widget is touched and when it receives a value.

Can be a number between 1 and 60 to specify the framerate (default: 30 fps). | + |
autoClear#
| `boolean` | true | If set to `false`, the canvas context won't be cleared automatically and `ctx.clear()` will need to be called in `onDraw`. | + |
continuous#
| `boolean`|
`number` | false | If set to `true`, `onDraw` will be called at each frame, otherwise it will be called only when the widget is touched and when it receives a value.

Can be a number between 1 and 60 to specify the framerate (default: 30 fps). | === "scripting" diff --git a/src/client/widgets/pads/canvas.js b/src/client/widgets/pads/canvas.js index 8517498d..087806b7 100644 --- a/src/client/widgets/pads/canvas.js +++ b/src/client/widgets/pads/canvas.js @@ -20,10 +20,10 @@ class CanvasWidget extends Canvas { 'When calling `set()` from a script, submitted value should be an array only if `valueLength` is greater than 1.' ]}, autoClear: {type: 'boolean', value: true, help: [ - 'If set to `false`, the canvas context won\'t be cleared automatically and `ctx.clear` will need to be called in `draw`.' + 'If set to `false`, the canvas context won\'t be cleared automatically and `ctx.clear()` will need to be called in `onDraw`.' ]}, continuous: {type: 'boolean|number', value: false, help: [ - 'If set to `true`, `draw` will be called at each frame, otherwise it will be called only when the widget is touched and when it receives a value.', + 'If set to `true`, `onDraw` will be called at each frame, otherwise it will be called only when the widget is touched and when it receives a value.', 'Can be a number between 1 and 60 to specify the framerate (default: 30 fps).' ]}, }