forked from Kitware/visualizer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
47 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
import { getRootState } from '..'; | ||
import access from './stateAccessor'; | ||
|
||
// ---------------------------------------------------------------------------- | ||
// Pure state selection | ||
// ---------------------------------------------------------------------------- | ||
|
||
export const getPaths = state => getRootState(state).save.paths; | ||
export const getStatuses = state => getRootState(state).save.statuses; | ||
export const getPaths = state => access(state).save.paths; | ||
export const getStatuses = state => access(state).save.statuses; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
let accessor = state => state; | ||
|
||
export default function getState(state) { | ||
return accessor(state); | ||
} | ||
|
||
export function updateVisualizerStateAccessor(fn) { | ||
accessor = fn; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
import { getRootState } from '..'; | ||
import access from './stateAccessor'; | ||
|
||
// ---------------------------------------------------------------------------- | ||
// Pure state selection | ||
// ---------------------------------------------------------------------------- | ||
|
||
export const isAnimationPlaying = state => !!getRootState(state).time.playing; | ||
export const getTimeStep = state => getRootState(state).time.index; | ||
export const getTimeValues = state => getRootState(state).time.values; | ||
export const isAnimationPlaying = state => !!access(state).time.playing; | ||
export const getTimeStep = state => access(state).time.index; | ||
export const getTimeValues = state => access(state).time.values; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
import { getRootState } from '..'; | ||
import access from './stateAccessor'; | ||
|
||
// ---------------------------------------------------------------------------- | ||
// Pure state selection | ||
// ---------------------------------------------------------------------------- | ||
|
||
export const getCollapsableState = state => getRootState(state).ui.collapsableState; | ||
export const getVisiblePanel = state => getRootState(state).ui.visiblePanel; | ||
export const getCollapsableState = state => access(state).ui.collapsableState; | ||
export const getVisiblePanel = state => access(state).ui.visiblePanel; |