Bug fix
This commit is contained in:
1 parent
665f76701d
commit
457242057d
3 files changed
+5
-4
No files matched your search
@@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
### Fixed
|
||||
|
||||
- A rare error when video player is closed but does not have valid content
|
||||
- A rare error that can occur with loading indicators causing a crash
|
||||
|
||||
## [0.17.0] - 2023-11-17
|
||||
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
import "pkg:/source/utils/Types.bs"
|
||||
|
||||
function Init()
|
||||
' TODO:P0 use component property with alias to fix crash
|
||||
' TODO:P2 make component disposable, and stop animation when component is disposed
|
||||
m.animation = m.top.findNode("loadingAnimation")
|
||||
m.top.observeField("visible", FuncName(OnVisibleChanged))
|
||||
OnVisibleChanged()
|
||||
end function
|
||||
@@ -13,10 +11,10 @@ function OnVisibleChanged()
|
||||
end function
|
||||
|
||||
function OnIndexSet()
|
||||
m.animation.delay = (m.top.index mod 5) * 0.2
|
||||
m.top.animationDelay = (m.top.index mod 5) * 0.2
|
||||
Animate()
|
||||
end function
|
||||
|
||||
function Animate()
|
||||
m.animation.control = m.top.visible ? "start" : "stop"
|
||||
m.top.animationControl = m.top.visible ? "start" : "stop"
|
||||
end function
|
||||
@@ -3,6 +3,8 @@
|
||||
<field id="itemContent" type="node" onChange="OnContentSet" />
|
||||
<field id="index" type="integer" onChange="OnIndexSet" />
|
||||
<field id="type" type="string" value="loading" />
|
||||
<field id="animationDelay" type="time" alias="loadingAnimation.delay" />
|
||||
<field id="animationControl" type="string" alias="loadingAnimation.control" />
|
||||
</interface>
|
||||
<children>
|
||||
<Rectangle
|
||||
|
||||
Reference in new issue
Block a user