blob: b62f2337b071d3ba52a5c7957687a95a06b2e240 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
import {Graph} from "./Graph";
import {observable, computed} from 'mobx';
import { Dictionary } from "typescript-collections";
import { string } from "prop-types";
import { Doc } from "../../../new_fields/Doc";
export class GraphManager {
@observable public Graphs: Graph[] = [];
@observable public GraphData: Doc = new Doc();
private static _instance: GraphManager;
@computed
public static get Instance():GraphManager {
return this._instance || (this._instance = new this());
}
private constructor(){
}
public set addGraph(graph:Graph){
this.Graphs.push(graph);
}
defaultGraphs = () => {
}
}
|