diff options
author | tschicke-brown <tyler_schicke@brown.edu> | 2019-02-22 12:36:11 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-22 12:36:11 -0500 |
commit | d2a34dca0cac114190f8f0eb36769b2b8fd9f329 (patch) | |
tree | 1128cba0e4532e1ca9ad5eba8c85cec1c74c2c5a /src/fields/Document.ts | |
parent | 9e4403f9c14cdb7e05901af5f8509753269eeb07 (diff) | |
parent | 0a5b336a638694b8d2f9d7366dc4dca6af97e970 (diff) |
Merge pull request #9 from browngraphicslab/collectionView
Added CollectionView
Diffstat (limited to 'src/fields/Document.ts')
-rw-r--r-- | src/fields/Document.ts | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/fields/Document.ts b/src/fields/Document.ts index 6667485b6..ff13732b3 100644 --- a/src/fields/Document.ts +++ b/src/fields/Document.ts @@ -90,6 +90,15 @@ export class Document extends Field { return field; } + GetAsync(key: Key, callback: (field: Field) => void): boolean { + //This currently doesn't deal with prototypes + if (this._proxies.has(key.Id)) { + Server.GetDocumentField(this, key, callback); + return true; + } + return false; + } + GetT<T extends Field = Field>(key: Key, ctor: { new(...args: any[]): T }, ignoreProto: boolean = false): FieldValue<T> { var getfield = this.Get(key, ignoreProto); if (getfield != FieldWaiting) { |