Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 | 43x 43x 43x 43x 43x 1x 1x 3x 1x | import { focusNode, setAllFocusedNodes, unfocusAllNodes, unfocusNode } from "./focusedNodePath.actions"
import { fileRoot } from "../../../../services/loadFile/fileRoot"
import { createReducer, on } from "@ngrx/store"
export const defaultFocusedNodePath: string[] = []
export const focusedNodePath = createReducer(
defaultFocusedNodePath,
on(setAllFocusedNodes, (_state, action) => [...action.value]),
on(unfocusAllNodes, () => []),
on(focusNode, (state, action) => (action.value === fileRoot.rootPath ? state : [action.value, ...state])),
on(unfocusNode, state => state.slice(1))
)
|