mirror of
https://codeberg.org/uzu/strudel
synced 2026-09-05 22:58:09 -04:00
implement onPaint with pattern state
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user