From 802e1780b12dbf6fb2499ea00d8cadd2e6e82b1a Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Thu, 26 Jun 2025 15:30:13 +0200 Subject: [PATCH] docs: canvas: ctx.clear() is not a thing --- src/client/widgets/pads/canvas.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/widgets/pads/canvas.js b/src/client/widgets/pads/canvas.js index 1b330cae..ce0d96c6 100644 --- a/src/client/widgets/pads/canvas.js +++ b/src/client/widgets/pads/canvas.js @@ -20,7 +20,7 @@ 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 `onDraw`.' + 'If set to `false`, the canvas context won\'t be cleared automatically and `ctx.clearRect()` will need to be called in `onDraw`.' ]}, continuous: {type: 'boolean|number', value: false, help: [ '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.',