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
|
### Fixed
|
||||||
|
|
||||||
- A rare error when video player is closed but does not have valid content
|
- 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
|
## [0.17.0] - 2023-11-17
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
import "pkg:/source/utils/Types.bs"
|
import "pkg:/source/utils/Types.bs"
|
||||||
|
|
||||||
function Init()
|
function Init()
|
||||||
' TODO:P0 use component property with alias to fix crash
|
|
||||||
' TODO:P2 make component disposable, and stop animation when component is disposed
|
' TODO:P2 make component disposable, and stop animation when component is disposed
|
||||||
m.animation = m.top.findNode("loadingAnimation")
|
|
||||||
m.top.observeField("visible", FuncName(OnVisibleChanged))
|
m.top.observeField("visible", FuncName(OnVisibleChanged))
|
||||||
OnVisibleChanged()
|
OnVisibleChanged()
|
||||||
end function
|
end function
|
||||||
@@ -13,10 +11,10 @@ function OnVisibleChanged()
|
|||||||
end function
|
end function
|
||||||
|
|
||||||
function OnIndexSet()
|
function OnIndexSet()
|
||||||
m.animation.delay = (m.top.index mod 5) * 0.2
|
m.top.animationDelay = (m.top.index mod 5) * 0.2
|
||||||
Animate()
|
Animate()
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function Animate()
|
function Animate()
|
||||||
m.animation.control = m.top.visible ? "start" : "stop"
|
m.top.animationControl = m.top.visible ? "start" : "stop"
|
||||||
end function
|
end function
|
||||||
@@ -3,6 +3,8 @@
|
|||||||
<field id="itemContent" type="node" onChange="OnContentSet" />
|
<field id="itemContent" type="node" onChange="OnContentSet" />
|
||||||
<field id="index" type="integer" onChange="OnIndexSet" />
|
<field id="index" type="integer" onChange="OnIndexSet" />
|
||||||
<field id="type" type="string" value="loading" />
|
<field id="type" type="string" value="loading" />
|
||||||
|
<field id="animationDelay" type="time" alias="loadingAnimation.delay" />
|
||||||
|
<field id="animationControl" type="string" alias="loadingAnimation.control" />
|
||||||
</interface>
|
</interface>
|
||||||
<children>
|
<children>
|
||||||
<Rectangle
|
<Rectangle
|
||||||
|
|||||||
Reference in new issue
Block a user