forked from PrincetonUniversity/PsyNeuLinkView
-
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
7 changed files
with
113 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
export const OPEN_FILE = 'open_file'; | ||
export const LOAD_MODEL = 'load_model'; | ||
export const SAVE_MODEL = 'save_model'; | ||
export const UPDATE_MODEL = 'update_model'; | ||
export const SIMULATE_MODEL = 'simulate_model'; | ||
export const CHANGE_VIEW = 'change_view'; | ||
export const SELECT = 'select'; | ||
export const OPEN_COMPOSITION = 'open_composition'; | ||
export const CLOSE_COMPOSITION = 'close_composition'; | ||
|
||
export const openFile = filePath => ({ | ||
type: OPEN_FILE, | ||
data: filePath | ||
}); | ||
|
||
export const loadModel = modelData => ({ | ||
type: LOAD_MODEL, | ||
data: modelData | ||
}); | ||
|
||
export const saveModel = filePath => ({ | ||
type: SAVE_MODEL, | ||
data: filePath | ||
}); | ||
|
||
export const updateModel = newModel => ({ | ||
type: UPDATE_MODEL, | ||
data: newModel | ||
}); | ||
|
||
export const simulateModel = model => ({ | ||
type: SIMULATE_MODEL, | ||
data: model | ||
}); | ||
|
||
export const changeView = newView => ({ | ||
type: CHANGE_VIEW, | ||
data: newView | ||
}); | ||
|
||
export const select = node => ({ | ||
type: SELECT, | ||
data: node | ||
}); | ||
|
||
export const openComposition = compositionId => ({ | ||
type: OPEN_COMPOSITION, | ||
data: compositionId | ||
}); | ||
|
||
export const closeComposition = () => ({ | ||
type: OPEN_FILE, | ||
data: undefined | ||
}); |
Empty file.
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,11 @@ | ||
import { GUIStates } from "../../constants" | ||
|
||
export const GENERAL_DEFAULT_STATE = { | ||
error: undefined, | ||
selected: undefined, | ||
original_model: undefined, | ||
model: undefined, | ||
gui_state: GUIStates.EDIT, | ||
composition_opened: undefined | ||
} | ||
|
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,34 @@ | ||
export const GENERAL_DEFAULT_STATE = { | ||
error: undefined, | ||
idsMap: {}, | ||
idsList: [], | ||
idsLoaded: 0, | ||
idsToLoad: 0, | ||
stepsToLoad: 1, | ||
stepsLoaded: 0, | ||
loading: false, | ||
instanceOnFocus : {}, | ||
ui : { | ||
canvas : { | ||
instanceSelection : {}, | ||
instanceDeleted : {}, | ||
instanceVisibilityChanged : false | ||
}, | ||
graph : { | ||
graphQueryIndex : -1, | ||
visible : true, | ||
sync : false | ||
}, | ||
termInfo : { termInfoVisible : false }, | ||
layers : { listViewerInfoVisible : true }, | ||
circuitBrowser : { | ||
circuitQuerySelected : [{ id : "", label : "" } , { id : "", label : "" }], | ||
visible : true | ||
}, | ||
layout: { | ||
"ThreeDViewer": true, | ||
"StackViewer": true, | ||
"TermInfo": true | ||
} | ||
} | ||
} |