aboutsummaryrefslogtreecommitdiff
path: root/src/stores/NodeStore.ts
diff options
context:
space:
mode:
authorPhilipp Eichmann <philipp.eichmann@gmail.com>2018-12-21 18:45:24 -0500
committerPhilipp Eichmann <philipp.eichmann@gmail.com>2018-12-21 18:45:24 -0500
commit06098b7bdd6a83f6b9cc07d2377f2a19cc0ecaa6 (patch)
treed665964243f9949424555175711e27166e96f70e /src/stores/NodeStore.ts
parent9caa9ca4a0b413e2da03eff4856cb324939d77d4 (diff)
added code
Diffstat (limited to 'src/stores/NodeStore.ts')
-rw-r--r--src/stores/NodeStore.ts24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/stores/NodeStore.ts b/src/stores/NodeStore.ts
new file mode 100644
index 000000000..6a734cf44
--- /dev/null
+++ b/src/stores/NodeStore.ts
@@ -0,0 +1,24 @@
+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