aboutsummaryrefslogtreecommitdiff
path: root/src/stores/NodeCollectionStore.ts
diff options
context:
space:
mode:
authoryipstanley <stanley_yip@brown.edu>2019-02-10 22:12:04 -0500
committeryipstanley <stanley_yip@brown.edu>2019-02-10 22:12:04 -0500
commit69f0b463a78c82aaf78ceb6a5162431424452311 (patch)
treea54c7129f36d307420422b3babfa6da4d85db67e /src/stores/NodeCollectionStore.ts
parent2e930b98726a09e597106d43a6763dd36d038771 (diff)
parent099c5823f05285fc5086c5a433658cf06dc4a04b (diff)
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into server_implementation
Diffstat (limited to 'src/stores/NodeCollectionStore.ts')
-rw-r--r--src/stores/NodeCollectionStore.ts26
1 files changed, 0 insertions, 26 deletions
diff --git a/src/stores/NodeCollectionStore.ts b/src/stores/NodeCollectionStore.ts
deleted file mode 100644
index 7fac83d51..000000000
--- a/src/stores/NodeCollectionStore.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-import { computed, observable, action } from "mobx";
-import { NodeStore } from "./NodeStore";
-import { Document } from "../fields/Document";
-
-export class NodeCollectionStore extends NodeStore {
-
- @observable
- public Scale: number = 1;
-
- @observable
- public Nodes: NodeStore[] = new Array<NodeStore>();
-
- @observable
- public Docs: Document[] = [];
-
- @computed
- public get Transform(): string {
- const halfWidth = window.innerWidth / 2, halfHeight = window.innerHeight / 2;
- return `translate(${this.X + halfWidth}px, ${this.Y + halfHeight}px) scale(${this.Scale}) translate(${-halfWidth}px, ${-halfHeight}px)`;
- }
-
- @action
- public AddNodes(stores: NodeStore[]): void {
- stores.forEach(store => this.Nodes.push(store));
- }
-} \ No newline at end of file