From 518bcbb39b36908fa2fc0152a6ec89daa3d34282 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Sun, 9 Jan 2022 16:11:53 +0100 Subject: [PATCH] docs: prop rename --- resources/docs/docs/widgets/canvas.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/docs/docs/widgets/canvas.md b/resources/docs/docs/widgets/canvas.md index 9c7e7d97..a1e3af20 100644 --- a/resources/docs/docs/widgets/canvas.md +++ b/resources/docs/docs/widgets/canvas.md @@ -67,7 +67,7 @@ This script has access to the same variables and functions as the `script` prope Let's create a simple xy pad, with a value made of two numbers between 0 and 1. We set `valueLength` to `2` to make sure the widget only accepts incoming messages with two values (x and y). -First, we use the `touch` property to store the touch coordinates in the `locals` object. We also call `set()` to store these in the widget's value (this way, the widget can send messages and sync with other widgets). +First, we use the `onTouch` property to store the touch coordinates in the `locals` object. We also call `set()` to store these in the widget's value (this way, the widget can send messages and sync with other widgets). ```js // onTouch @@ -88,7 +88,7 @@ if (event.type == "start") { set("this", [locals.x, locals.y]) ``` -Then, we use the `draw` property to draw a circle at the touch coordinates. +Then, we use the `onDraw` property to draw a circle at the touch coordinates. ```js // onDraw @@ -101,7 +101,7 @@ ctx.strokeStyle = cssVars.colorFill ctx.stroke() ``` -Finally, we use the `script` property to apply limits to the values. +Finally, we use the `onValue` property to apply limits to the values. ```js // onValue