-
Notifications
You must be signed in to change notification settings - Fork 1
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
5 changed files
with
213 additions
and
133 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
--- | ||
id: datamodel | ||
title: DataModel | ||
--- | ||
|
||
Note: this document is automatically generated from mobx-state-tree objects in | ||
our source code. | ||
|
||
### Source file | ||
|
||
[src/DataModel.ts](https://github.com/GMOD/react-msaview/blob/main/lib/src/DataModel.ts) | ||
|
||
the data stored for the model. this is sometimes temporary in the case that | ||
e.g. msaFilehandle is available on the parent model, because then the msa | ||
data will not be persisted in saved session snapshots, it will be fetched | ||
from msaFilehandle at startup | ||
|
||
### DataModel - Properties | ||
#### property: msa | ||
|
||
|
||
|
||
```js | ||
// type signature | ||
IMaybe<ISimpleType<string>> | ||
// code | ||
msa: types.maybe(types.string) | ||
``` | ||
|
||
#### property: tree | ||
|
||
|
||
|
||
```js | ||
// type signature | ||
IMaybe<ISimpleType<string>> | ||
// code | ||
tree: types.maybe(types.string) | ||
``` | ||
|
||
#### property: treeMetadata | ||
|
||
|
||
|
||
```js | ||
// type signature | ||
IMaybe<ISimpleType<string>> | ||
// code | ||
treeMetadata: types.maybe(types.string) | ||
``` | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
### DataModel - Actions | ||
#### action: setMSA | ||
|
||
|
||
|
||
```js | ||
// type signature | ||
setMSA: (msa?: string) => void | ||
``` | ||
|
||
#### action: setTree | ||
|
||
|
||
|
||
```js | ||
// type signature | ||
setTree: (tree?: string) => void | ||
``` | ||
|
||
#### action: setTreeMetadata | ||
|
||
|
||
|
||
```js | ||
// type signature | ||
setTreeMetadata: (treeMetadata?: string) => void | ||
``` | ||
|
||
|
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,46 @@ | ||
import { types } from 'mobx-state-tree' | ||
|
||
/** | ||
* #stateModel DataModel | ||
* the data stored for the model. this is sometimes temporary in the case that | ||
* e.g. msaFilehandle is available on the parent model, because then the msa | ||
* data will not be persisted in saved session snapshots, it will be fetched | ||
* from msaFilehandle at startup | ||
*/ | ||
export function DataModelF() { | ||
return types | ||
.model({ | ||
/** | ||
* #property | ||
*/ | ||
tree: types.maybe(types.string), | ||
/** | ||
* #property | ||
*/ | ||
msa: types.maybe(types.string), | ||
/** | ||
* #property | ||
*/ | ||
treeMetadata: types.maybe(types.string), | ||
}) | ||
.actions(self => ({ | ||
/** | ||
* #action | ||
*/ | ||
setTree(tree?: string) { | ||
self.tree = tree | ||
}, | ||
/** | ||
* #action | ||
*/ | ||
setMSA(msa?: string) { | ||
self.msa = msa | ||
}, | ||
/** | ||
* #action | ||
*/ | ||
setTreeMetadata(treeMetadata?: string) { | ||
self.treeMetadata = treeMetadata | ||
}, | ||
})) | ||
} |
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
Oops, something went wrong.