implement onPaint with pattern state
This commit is contained in:
parent
94e411aa7a
commit
faba4a4e4e
2 changed files with 27 additions and 6 deletions
|
|
@ -94,6 +94,14 @@ export class Pattern {
|
|||
return result;
|
||||
}
|
||||
|
||||
// runs func on query state
|
||||
withState(func) {
|
||||
return this.withHaps((haps, state) => {
|
||||
func(state);
|
||||
return haps;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* see `withValue`
|
||||
* @noAutocomplete
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue