newcar
newcar copied to clipboard
[Bug] Failed to hide widget after playing
Describe the bug
Before playing the animation (called app.play()
), you can freely change the visible of a widget, but after playing, you can only show and cannot hide, and the widget.display.value
is always keeps true
.
To Reproduce Steps to reproduce the behavior:
- Go to directory
./examples/scene1.ts
- To reproduce, please type following codes:
import {Circle, createScene, move, Rect, Widget} from 'newcar'
// import TextEditor from "@newcar/mod-text-editor";
import * as nc from "newcar";
await nc.useFont('./default.ttf')
export default createScene(
new Circle(100, {
x: 100,
y: 100
})
.setup(function *(widget) {
yield 1
widget.hide()
console.log(widget.display.value)
})
)
According to the image and output, you can easily discover that only a nick of time you can see the false was put into outputs, either was true.
If you are interested in this bug, please comment under the issue.