aboutsummaryrefslogtreecommitdiff
path: root/src/fields/Document.ts
diff options
context:
space:
mode:
authorTyler Schicke <tyler_schicke@brown.edu>2019-04-04 01:30:01 -0400
committerTyler Schicke <tyler_schicke@brown.edu>2019-04-04 01:30:01 -0400
commitdc2a998acdae1545c8e7bf9ee9f4ca98bba82ac9 (patch)
tree4f1c39d66dc9a3a653ec717c502854f60029add3 /src/fields/Document.ts
parentc10b9ca57e13c8de8b35f01e6c6ce82706319e4d (diff)
Started adding linting
Diffstat (limited to 'src/fields/Document.ts')
-rw-r--r--src/fields/Document.ts14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/fields/Document.ts b/src/fields/Document.ts
index 85ff6ddcb..45e4f93f6 100644
--- a/src/fields/Document.ts
+++ b/src/fields/Document.ts
@@ -30,9 +30,9 @@ export class Document extends Field {
}
}
- public Width = () => { return this.GetNumber(KeyStore.Width, 0) }
- public Height = () => { return this.GetNumber(KeyStore.Height, this.GetNumber(KeyStore.NativeWidth, 0) ? this.GetNumber(KeyStore.NativeHeight, 0) / this.GetNumber(KeyStore.NativeWidth, 0) * this.GetNumber(KeyStore.Width, 0) : 0) }
- public Scale = () => { return this.GetNumber(KeyStore.Scale, 1) }
+ public Width = () => this.GetNumber(KeyStore.Width, 0)
+ public Height = () => this.GetNumber(KeyStore.Height, this.GetNumber(KeyStore.NativeWidth, 0) ? this.GetNumber(KeyStore.NativeHeight, 0) / this.GetNumber(KeyStore.NativeWidth, 0) * this.GetNumber(KeyStore.Width, 0) : 0)
+ public Scale = () => this.GetNumber(KeyStore.Scale, 1)
@computed
public get Title(): string {
@@ -90,7 +90,7 @@ export class Document extends Field {
}
} else {
let doc: FieldValue<Document> = this;
- while (doc && doc != FieldWaiting && field != FieldWaiting) {
+ while (doc && doc !== FieldWaiting && field !== FieldWaiting) {
let curField = doc.fields.get(key.Id);
let curProxy = doc._proxies.get(key.Id);
if (!curField || (curProxy && curField.field.Id !== curProxy)) {
@@ -118,7 +118,7 @@ export class Document extends Field {
break;
}
}
- if (doc == FieldWaiting)
+ if (doc === FieldWaiting)
field = FieldWaiting;
}
@@ -165,7 +165,7 @@ export class Document extends Field {
if (callback) {
fn(callback);
} else {
- return new Promise(res => fn(res));
+ return new Promise(fn);
}
}
@@ -356,7 +356,7 @@ export class Document extends Field {
let fields: [string, string][] = []
this._proxies.forEach((field, key) => {
if (field) {
- fields.push([key, field as string])
+ fields.push([key, field])
}
});