diff options
author | bob <bcz@cs.brown.edu> | 2019-03-18 09:52:17 -0400 |
---|---|---|
committer | bob <bcz@cs.brown.edu> | 2019-03-18 09:52:17 -0400 |
commit | c63f1d12b379f788b8065416519ee05c78e7f23a (patch) | |
tree | 808674520cb5d7434c038789b21e4c5051abed02 | |
parent | 0a37e271eba5bf40d56ee3941f474cb0f10c0396 (diff) | |
parent | 5be91465a7d534587a483d5631df705468910839 (diff) |
Merge branch 'master' into authentication
-rw-r--r-- | src/client/Server.ts | 3 | ||||
-rw-r--r-- | src/client/views/collections/CollectionFreeFormView.tsx | 2 | ||||
-rw-r--r-- | src/client/views/collections/CollectionVideoView.tsx | 2 | ||||
-rw-r--r-- | src/client/views/collections/PreviewCursor.tsx | 1 | ||||
-rw-r--r-- | src/fields/ListField.ts | 6 |
5 files changed, 7 insertions, 7 deletions
diff --git a/src/client/Server.ts b/src/client/Server.ts index 5e42c8285..3fb1ae878 100644 --- a/src/client/Server.ts +++ b/src/client/Server.ts @@ -56,6 +56,7 @@ export class Server { let field = this.ClientFieldsCached.get(id); if (!field) { neededFieldIds.push(id); + this.ClientFieldsCached.set(id, FieldWaiting); } else if (field === FieldWaiting) { waitingFieldIds.push(id); } else { @@ -65,7 +66,7 @@ export class Server { SocketStub.SEND_FIELDS_REQUEST(neededFieldIds, (fields) => { for (let key in fields) { let field = fields[key]; - if (!this.ClientFieldsCached.has(field.Id)) { + if (!(this.ClientFieldsCached.get(field.Id) instanceof Field)) { this.ClientFieldsCached.set(field.Id, field) } } diff --git a/src/client/views/collections/CollectionFreeFormView.tsx b/src/client/views/collections/CollectionFreeFormView.tsx index f0096109a..5af30d334 100644 --- a/src/client/views/collections/CollectionFreeFormView.tsx +++ b/src/client/views/collections/CollectionFreeFormView.tsx @@ -343,7 +343,7 @@ export class CollectionFreeFormView extends CollectionViewBase { onDrop={this.onDrop.bind(this)} onDragOver={this.onDragOver} onBlur={this.onBlur} - style={{ borderWidth: `${COLLECTION_BORDER_WIDTH}px`, }} + style={{ borderWidth: `${COLLECTION_BORDER_WIDTH}px` }}// , zIndex: !this.props.isTopMost ? -1 : undefined }} tabIndex={0} ref={this.createDropTarget}> <div className="collectionfreeformview" diff --git a/src/client/views/collections/CollectionVideoView.tsx b/src/client/views/collections/CollectionVideoView.tsx index b64ef3c07..8fc1a1b4d 100644 --- a/src/client/views/collections/CollectionVideoView.tsx +++ b/src/client/views/collections/CollectionVideoView.tsx @@ -112,7 +112,7 @@ export class CollectionVideoView extends React.Component<CollectionViewProps> { render() { return (<div className="collectionVideoView-cont" ref={this._mainCont} onContextMenu={this.specificContextMenu}> {this.subView} - {this.uIButtons} + {this.props.isSelected() ? this.uIButtons : (null)} </div>) } }
\ No newline at end of file diff --git a/src/client/views/collections/PreviewCursor.tsx b/src/client/views/collections/PreviewCursor.tsx index cbcfa568d..cbf36cf9e 100644 --- a/src/client/views/collections/PreviewCursor.tsx +++ b/src/client/views/collections/PreviewCursor.tsx @@ -59,7 +59,6 @@ export class PreviewCursor extends React.Component<PreviewCursorProps> { let newBox = Documents.TextDocument({ width: 200, height: 100, x: x, y: y, title: "new" }); this.props.addLiveTextDocument(newBox); e.stopPropagation(); - e.preventDefault(); } } diff --git a/src/fields/ListField.ts b/src/fields/ListField.ts index 77c1d6e14..4527ee548 100644 --- a/src/fields/ListField.ts +++ b/src/fields/ListField.ts @@ -20,6 +20,9 @@ export class ListField<T extends Field> extends BasicField<T[]> { private observeDisposer: Lambda | undefined; private observeList(): void { + if (this.observeDisposer) { + this.observeDisposer() + } this.observeDisposer = observe(this.Data as IObservableArray<T>, (change: IArrayChange<T> | IArraySplice<T>) => { this.updateProxies() if (change.type == "splice") { @@ -39,9 +42,6 @@ export class ListField<T extends Field> extends BasicField<T[]> { } protected setData(value: T[]) { - if (this.observeDisposer) { - this.observeDisposer() - } this.data = observable(value); this.updateProxies(); this.observeList(); |