From 68d18976359434c46cc9bde3df6fbe708021761e Mon Sep 17 00:00:00 2001 From: Bob Zeleznik Date: Sun, 5 May 2019 15:10:18 -0400 Subject: fixed problem with annotations being added to view document instead of proto. added keyvalue indication for fields that only exist on prootype --- src/client/views/collections/CollectionBaseView.tsx | 4 ++-- src/client/views/collections/CollectionSchemaView.tsx | 1 + src/client/views/nodes/KeyValuePair.tsx | 4 +++- 3 files changed, 6 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/client/views/collections/CollectionBaseView.tsx b/src/client/views/collections/CollectionBaseView.tsx index 76adfcdcd..cbb568c07 100644 --- a/src/client/views/collections/CollectionBaseView.tsx +++ b/src/client/views/collections/CollectionBaseView.tsx @@ -100,12 +100,12 @@ export class CollectionBaseView extends React.Component { value.push(doc); } } else { - this.props.Document[this.props.fieldKey] = new List([doc]); + Doc.SetOnPrototype(this.props.Document, this.props.fieldKey, new List([doc])); } // set the ZoomBasis only if hasn't already been set -- bcz: maybe set/resetting the ZoomBasis should be a parameter to addDocument? if (this.collectionViewType === CollectionViewType.Freeform || this.collectionViewType === CollectionViewType.Invalid) { let zoom = NumCast(this.props.Document.scale, 1); - doc.zoomBasis = zoom; + Doc.SetOnPrototype(doc, "zoomBasis", zoom); } } return true; diff --git a/src/client/views/collections/CollectionSchemaView.tsx b/src/client/views/collections/CollectionSchemaView.tsx index 67784fa81..4fee9db85 100644 --- a/src/client/views/collections/CollectionSchemaView.tsx +++ b/src/client/views/collections/CollectionSchemaView.tsx @@ -268,6 +268,7 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) { focus={emptyFunction} parentActive={this.props.active} whenActiveChanged={this.props.whenActiveChanged} + bringToFront={emptyFunction} /> { PanelHeight: returnZero, }; let contents = ; + let fieldKey = Object.keys(props.Document).indexOf(props.fieldKey) !== -1 ? props.fieldKey : "(" + props.fieldKey + ")"; return ( @@ -50,11 +51,12 @@ export class KeyValuePair extends React.Component { }}> X -
{this.props.keyName}
+
{fieldKey}
{ + let field = FieldValue(props.Document[props.fieldKey]); if (field) { //TODO Types -- cgit v1.2.3-70-g09d2