Docs: Fix unclear text in reactivity example (#9217)

This commit is contained in:
Nigel Breslaw 2025-08-21 15:06:52 +03:00 committed by GitHub
parent 1479c3f579
commit 007cfd26b9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -22,21 +22,19 @@ export component MyComponent {
myRect := Rectangle {
x: ta.mouse-x;
y: ta.mouse-y;
width: 40px;
height: 40px;
background: ta.pressed ? orange : white;
}
Text {
x: 5px; y: 5px;
text: "x: " + myRect.x / 1px;
color: white;
}
Text {
x: 5px; y: 15px;
text: "y: " + myRect.y / 1px;
color: white;
width: 60px;
height: 60px;
background: ta.pressed ? orange : skyblue;
Text {
x: 5px; y: 5px;
text: "x: " + myRect.x / 1px;
color: white;
}
Text {
x: 5px; y: 20px;
text: "y: " + myRect.y / 1px;
color: white;
}
}
}
```
@ -124,18 +122,19 @@ export component MyComponent {
myRect := Rectangle {
x: ta.mouse-x;
y: ta.mouse-y;
width: 40px;
height: 40px;
background: ta.pressed ? orange : white;
}
Text {
x: 5px; y: 5px;
text: "x: " + lengthToInt(myRect.x);
}
Text {
x: 5px; y: 15px;
text: "y: " + lengthToInt(myRect.y);
width: 60px;
height: 60px;
background: ta.pressed ? orange : skyblue;
Text {
x: 5px; y: 5px;
text: "x: " + lengthToInt(myRect.x);
color: white;
}
Text {
x: 5px; y: 20px;
text: "y: " + lengthToInt(myRect.y);
color: white;
}
}
}
```