aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/nodes')
-rw-r--r--src/client/views/nodes/CollectionFreeFormDocumentView.tsx8
-rw-r--r--src/client/views/nodes/DocumentView.tsx6
-rw-r--r--src/client/views/nodes/FieldView.tsx5
3 files changed, 10 insertions, 9 deletions
diff --git a/src/client/views/nodes/CollectionFreeFormDocumentView.tsx b/src/client/views/nodes/CollectionFreeFormDocumentView.tsx
index e6475ee2a..ce453b4af 100644
--- a/src/client/views/nodes/CollectionFreeFormDocumentView.tsx
+++ b/src/client/views/nodes/CollectionFreeFormDocumentView.tsx
@@ -52,12 +52,12 @@ export class CollectionFreeFormDocumentView extends React.Component<DocumentView
this.props.Document.SetData(KeyStore.ZIndex, h, NumberField)
}
- contentScaling = () =>
- this.nativeWidth > 0 ? this.width / this.nativeWidth : 1
+ contentScaling = () => this.nativeWidth > 0 ? this.width / this.nativeWidth : 1
getTransform = (): Transform =>
- this.props.ScreenToLocalTransform().
- translate(-this.props.Document.GetNumber(KeyStore.X, 0), -this.props.Document.GetNumber(KeyStore.Y, 0)).scale(1 / this.contentScaling())
+ this.props.ScreenToLocalTransform()
+ .translate(-this.props.Document.GetNumber(KeyStore.X, 0), -this.props.Document.GetNumber(KeyStore.Y, 0))
+ .scale(1 / this.contentScaling())
@computed
get docView() {
diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx
index 34eb8919f..3b146654c 100644
--- a/src/client/views/nodes/DocumentView.tsx
+++ b/src/client/views/nodes/DocumentView.tsx
@@ -85,6 +85,9 @@ export function FakeJsxArgs(keys: string[], fields: string[] = []): JsxArgs {
@observer
export class DocumentView extends React.Component<DocumentViewProps> {
private _mainCont = React.createRef<HTMLDivElement>();
+ public get ContentRef() {
+ return this._mainCont;
+ }
private _downX: number = 0;
private _downY: number = 0;
@computed get active(): boolean { return SelectionManager.IsSelected(this) || this.props.parentActive(); }
@@ -287,8 +290,7 @@ export class DocumentView extends React.Component<DocumentViewProps> {
}
- isSelected = () =>
- SelectionManager.IsSelected(this)
+ isSelected = () => SelectionManager.IsSelected(this)
select = (ctrlPressed: boolean) => {
SelectionManager.SelectDoc(this, ctrlPressed)
diff --git a/src/client/views/nodes/FieldView.tsx b/src/client/views/nodes/FieldView.tsx
index d6035a076..d9422ae9b 100644
--- a/src/client/views/nodes/FieldView.tsx
+++ b/src/client/views/nodes/FieldView.tsx
@@ -96,8 +96,7 @@ export class FieldView extends React.Component<FieldViewProps> {
}
else if (field instanceof ListField) {
return (<div>
- {(field as ListField<Field>).Data.map(f =>
- f instanceof Document ? f.Title : f.GetValue().toString()).join(", ")}
+ {(field as ListField<Field>).Data.map(f => f instanceof Document ? f.Title : f.GetValue().toString()).join(", ")}
</div>)
}
// bcz: this belongs here, but it doesn't render well so taking it out for now
@@ -107,7 +106,7 @@ export class FieldView extends React.Component<FieldViewProps> {
else if (field instanceof NumberField) {
return <p>{field.Data}</p>
}
- else if (field != FieldWaiting) {
+ else if (field !== FieldWaiting) {
return <p>{JSON.stringify(field.GetValue())}</p>
}
else