aboutsummaryrefslogtreecommitdiff
path: root/src/views/nodes/CollectionFreeFormDocumentView.tsx
diff options
context:
space:
mode:
authorbob <bcz@cs.brown.edu>2019-02-06 16:11:42 -0500
committerbob <bcz@cs.brown.edu>2019-02-06 16:11:42 -0500
commit59d5992f2a101eff7743328c3fdefe6a0006ada9 (patch)
treeb28dbb2e06f1fffeafcd2b43845072f9f3f6f1fc /src/views/nodes/CollectionFreeFormDocumentView.tsx
parent7598b88bbad9690c59f8b164144aa0d02a0a211f (diff)
parent84eea14a86265ce0585342d9f3a3c4107c02df17 (diff)
woring db stub.
Diffstat (limited to 'src/views/nodes/CollectionFreeFormDocumentView.tsx')
-rw-r--r--src/views/nodes/CollectionFreeFormDocumentView.tsx25
1 files changed, 12 insertions, 13 deletions
diff --git a/src/views/nodes/CollectionFreeFormDocumentView.tsx b/src/views/nodes/CollectionFreeFormDocumentView.tsx
index d98c8dcb7..25d67d96a 100644
--- a/src/views/nodes/CollectionFreeFormDocumentView.tsx
+++ b/src/views/nodes/CollectionFreeFormDocumentView.tsx
@@ -10,8 +10,7 @@ import { ContextMenu } from "../ContextMenu";
import "./NodeView.scss";
import React = require("react");
import { DocumentView, DocumentViewProps } from "./DocumentView";
-import { WAITING } from "../../fields/Field";
-import { ImageField } from '../../fields/ImageField';
+import { FieldWaiting } from "../../fields/Field";
@observer
@@ -32,20 +31,20 @@ export class CollectionFreeFormDocumentView extends DocumentView {
@computed
get x(): number {
- return this.props.Document.GetFieldValue(KeyStore.X, NumberField, Number(0));
+ return this.props.Document.GetData(KeyStore.X, NumberField, Number(0));
}
@computed
get y(): number {
- return this.props.Document.GetFieldValue(KeyStore.Y, NumberField, Number(0));
+ return this.props.Document.GetData(KeyStore.Y, NumberField, Number(0));
}
set x(x: number) {
- this.props.Document.SetFieldValue(KeyStore.X, x, NumberField)
+ this.props.Document.SetData(KeyStore.X, x, NumberField)
}
set y(y: number) {
- this.props.Document.SetFieldValue(KeyStore.Y, y, NumberField)
+ this.props.Document.SetData(KeyStore.Y, y, NumberField)
}
@computed
@@ -55,29 +54,29 @@ export class CollectionFreeFormDocumentView extends DocumentView {
@computed
get width(): number {
- return this.props.Document.GetFieldValue(KeyStore.Width, NumberField, Number(0));
+ return this.props.Document.GetData(KeyStore.Width, NumberField, Number(0));
}
set width(w: number) {
- this.props.Document.SetFieldValue(KeyStore.Width, w, NumberField)
+ this.props.Document.SetData(KeyStore.Width, w, NumberField)
}
@computed
get height(): number {
- return this.props.Document.GetFieldValue(KeyStore.Height, NumberField, Number(0));
+ return this.props.Document.GetData(KeyStore.Height, NumberField, Number(0));
}
set height(h: number) {
- this.props.Document.SetFieldValue(KeyStore.Height, h, NumberField)
+ this.props.Document.SetData(KeyStore.Height, h, NumberField)
}
@computed
get zIndex(): number {
- return this.props.Document.GetFieldValue(KeyStore.ZIndex, NumberField, Number(0));
+ return this.props.Document.GetData(KeyStore.ZIndex, NumberField, Number(0));
}
set zIndex(h: number) {
- this.props.Document.SetFieldValue(KeyStore.ZIndex, h, NumberField)
+ this.props.Document.SetData(KeyStore.ZIndex, h, NumberField)
}
@action
@@ -87,7 +86,7 @@ export class CollectionFreeFormDocumentView extends DocumentView {
@computed
get active(): boolean {
return SelectionManager.IsSelected(this) || this.props.ContainingCollectionView === undefined ||
- (this.props.ContainingCollectionView != WAITING && this.props.ContainingCollectionView!.active);
+ (this.props.ContainingCollectionView != FieldWaiting && this.props.ContainingCollectionView!.active);
}
@computed