diff options
| author | Tyler Schicke <tyler_schicke@brown.edu> | 2019-02-09 17:31:30 -0500 |
|---|---|---|
| committer | Tyler Schicke <tyler_schicke@brown.edu> | 2019-02-09 17:31:30 -0500 |
| commit | c06745a99ed85b215d0ae48bfb2af7c955f0b016 (patch) | |
| tree | 7e7700d5dac882f2a7cfd4e95140858adb8ba6bd /src/stores | |
| parent | db177e6ff03a95f0f426943b4b6aaffea77204de (diff) | |
Removed unused starter project files
Diffstat (limited to 'src/stores')
| -rw-r--r-- | src/stores/NodeCollectionStore.ts | 26 | ||||
| -rw-r--r-- | src/stores/NodeStore.ts | 24 | ||||
| -rw-r--r-- | src/stores/RootStore.ts | 15 | ||||
| -rw-r--r-- | src/stores/StaticTextNodeStore.ts | 16 | ||||
| -rw-r--r-- | src/stores/VideoNodeStore.ts | 17 |
5 files changed, 0 insertions, 98 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 diff --git a/src/stores/NodeStore.ts b/src/stores/NodeStore.ts deleted file mode 100644 index 6a734cf44..000000000 --- a/src/stores/NodeStore.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { computed, observable } from "mobx"; -import { Utils } from "../Utils"; - -export class NodeStore { - - public Id: string = Utils.GenerateGuid(); - - @observable - public X: number = 0; - - @observable - public Y: number = 0; - - @observable - public Width: number = 0; - - @observable - public Height: number = 0; - - @computed - public get Transform(): string { - return "translate(" + this.X + "px, " + this.Y + "px)"; - } -}
\ No newline at end of file diff --git a/src/stores/RootStore.ts b/src/stores/RootStore.ts deleted file mode 100644 index 847fb6807..000000000 --- a/src/stores/RootStore.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { action, observable } from "mobx"; - -// This globally accessible store might come in handy, although you may decide that you don't need it. -export class RootStore { - - private constructor() { - // initialization code - } - - private static _instance: RootStore; - - public static get Instance(): RootStore { - return this._instance || (this._instance = new this()); - } -}
\ No newline at end of file diff --git a/src/stores/StaticTextNodeStore.ts b/src/stores/StaticTextNodeStore.ts deleted file mode 100644 index 7c342a7a2..000000000 --- a/src/stores/StaticTextNodeStore.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { observable } from "mobx"; -import { NodeStore } from "./NodeStore"; - -export class StaticTextNodeStore extends NodeStore { - - constructor(initializer: Partial<StaticTextNodeStore>) { - super(); - Object.assign(this, initializer); - } - - @observable - public Title: string = ""; - - @observable - public Text: string = ""; -}
\ No newline at end of file diff --git a/src/stores/VideoNodeStore.ts b/src/stores/VideoNodeStore.ts deleted file mode 100644 index e5187ab07..000000000 --- a/src/stores/VideoNodeStore.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { observable } from "mobx"; -import { NodeStore } from "./NodeStore"; - -export class VideoNodeStore extends NodeStore { - - constructor(initializer: Partial<VideoNodeStore>) { - super(); - Object.assign(this, initializer); - } - - @observable - public Title: string = ""; - - @observable - public Url: string = ""; - -}
\ No newline at end of file |
