Skip to content

Commit

Permalink
Merge pull request #208 from georgejecook/fix/observe-fraction-fixes
Browse files Browse the repository at this point in the history
Fix/observe fraction fixes
  • Loading branch information
georgejecook authored Jun 24, 2022
2 parents f10f29d + fa396aa commit f7383da
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 3 deletions.
12 changes: 11 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

## [0.51.1](https://github.com/georgejecook/maestro-roku/compare/0.51.0...0.51.1)
## [0.51.2](https://github.com/georgejecook/maestro-roku/compare/0.51.1...0.51.2)

### Merged

- fix(core): fixes completion state callback not firing for selection [`#207`](https://github.com/georgejecook/maestro-roku/pull/207)

### Commits

- bump [`b2e88d1`](https://github.com/georgejecook/maestro-roku/commit/b2e88d1203b8798a320c5af00eb54ab6cf64e4f8)

## [0.51.1](https://github.com/georgejecook/maestro-roku/compare/0.51.0...0.51.1) - 2022-06-21

### Merged

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "maestro-roku",
"version": "0.51.1",
"version": "0.51.2",
"description": "A development platform for building roku channels in brighterscript",
"directories": {
"doc": "docs"
Expand Down
5 changes: 4 additions & 1 deletion src/source/core/Tasks.bs
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,10 @@ class ValueObserver
end function

function onValue(value as dynamic, func as function, comparator = "=" as string, mode = "value" as string)
m.comparators[`${value}_${comparator}`] = { v: value, cb: func, c: comparator, mode: mode }
c = { v: value, cb: func, c: comparator, mode: mode }
key = `${value}_${comparator}`
m.comparators[key] = c
m.pendingComparators[key] = c
end function

function valueCallback(value as dynamic, node as mc.types.node)
Expand Down
4 changes: 4 additions & 0 deletions src/source/view/transitions/FadeTransition.bs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ namespace mv.transitions
end if
end function, m)

m.blackFadeAnim.observeFraction(function(f as float)
m.top.progress = f
end function, m)

m.blackFadeAnim.onFraction(1, function(f as float)
m.finish()
end function, m)
Expand Down

0 comments on commit f7383da

Please sign in to comment.