diff options
| author | Bob Zeleznik <zzzman@gmail.com> | 2020-05-07 19:18:52 -0400 |
|---|---|---|
| committer | Bob Zeleznik <zzzman@gmail.com> | 2020-05-07 19:18:52 -0400 |
| commit | fcd0895e5933270718b9c1a262e7e377eaabb024 (patch) | |
| tree | ff2c228814674e5aa7f88be8501863b6eb85b232 /src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx | |
| parent | 34db0a78d2dc8989313decf8993691f40847b231 (diff) | |
fixed most add/remove/move documents to support doc[]'s
Diffstat (limited to 'src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx')
| -rw-r--r-- | src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx index 6011d5f9c..b32318d66 100644 --- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx +++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx @@ -123,7 +123,7 @@ export class CollectionFreeFormView extends CollectionSubView<PanZoomDocument, P FormattedTextBox.SelectOnLoad = newBox[Id];// track the new text box so we can give it a prop that tells it to focus itself when it's displayed this.addDocument(newBox); } - private addDocument = (newBox: Doc) => { + private addDocument = (newBox: Doc | Doc[]) => { if (newBox instanceof Doc) { const added = this.props.addDocument(newBox); added && this.bringToFront(newBox); @@ -184,7 +184,7 @@ export class CollectionFreeFormView extends CollectionSubView<PanZoomDocument, P const nh = NumCast(layoutDoc._nativeHeight); layoutDoc._height = nw && nh ? nh / nw * NumCast(layoutDoc._width) : 300; } - d.isBackground === undefined && (d.zIndex = zsorted.length + 1 + i); + d.isBackground === undefined && (d.zIndex = zsorted.length + 1 + i); // bringToFront } }); |
