highlight viewing pattern
This commit is contained in:
parent
1bc86c359e
commit
02b9bd82cf
3 changed files with 43 additions and 15 deletions
|
|
@ -28,6 +28,19 @@ export const defaultSettings = {
|
|||
|
||||
export const settingsMap = persistentMap('strudel-settings', defaultSettings);
|
||||
|
||||
|
||||
//pattern that the use is currently viewing in the window
|
||||
const $viewingPattern = persistentAtom('viewingPattern', '', { listen: false });
|
||||
export function setViewingPattern(key) {
|
||||
$viewingPattern.set(key);
|
||||
}
|
||||
export function getViewingPattern() {
|
||||
return $viewingPattern.get();
|
||||
}
|
||||
|
||||
export function useViewingPattern() {
|
||||
return useStore($viewingPattern);
|
||||
}
|
||||
// active pattern is separate, because it shouldn't sync state across tabs
|
||||
// reason: https://github.com/tidalcycles/strudel/issues/857
|
||||
const $activePattern = persistentAtom('activePattern', '', { listen: false });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue