diff options
author | bobzel <zzzman@gmail.com> | 2020-09-21 12:46:37 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2020-09-21 12:46:37 -0400 |
commit | 8089f668de934cc031a91c093c481856e7c8fe8b (patch) | |
tree | c455eb43f46e54add033fbb1b44f20b804ad0201 /src | |
parent | 64d8094c459a8818151d48f4f1d75b070dc745d2 (diff) | |
parent | a311773a086bb526a4af08cc82c11b9527032159 (diff) |
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web
Diffstat (limited to 'src')
-rw-r--r-- | src/client/views/nodes/PresBox.tsx | 16 | ||||
-rw-r--r-- | src/fields/util.ts | 2 |
2 files changed, 9 insertions, 9 deletions
diff --git a/src/client/views/nodes/PresBox.tsx b/src/client/views/nodes/PresBox.tsx index c5a64af3e..7eca09f8c 100644 --- a/src/client/views/nodes/PresBox.tsx +++ b/src/client/views/nodes/PresBox.tsx @@ -265,19 +265,19 @@ export class PresBox extends ViewBoxBaseComponent<FieldViewProps, PresBoxSchema> this.layoutDoc.presCollection = srcContext; } else if (targetDoc) this.layoutDoc.presCollection = targetDoc; } - if (collectionDocView) { - if (srcContext && srcContext !== presCollection) { - // Case 1: new srcContext inside of current collection so add a new tab to the current pres collection - collectionDocView.props.addDocTab(srcContext, "inPlace"); - } - } + // if (collectionDocView) { + // if (srcContext && srcContext !== presCollection) { + // // Case 1: new srcContext inside of current collection so add a new tab to the current pres collection + // collectionDocView.props.addDocTab(srcContext, "inPlace"); + // } + // } this.updateCurrentPresentation(); const docToJump = curDoc; const willZoom = false; // If openDocument is selected then it should open the document for the user if (activeItem.openDocument) { - this.props.addDocTab(activeItem, "replace:right"); + collectionDocView ? collectionDocView.props.addDocTab(activeItem, "inPlace") : this.props.addDocTab(activeItem, "replace:right"); } else //docToJump stayed same meaning, it was not in the group or was the last element in the group if (activeItem.zoomProgressivize && this.rootDoc.presStatus !== 'edit') { @@ -1047,7 +1047,7 @@ export class PresBox extends ViewBoxBaseComponent<FieldViewProps, PresBoxSchema> activeItem.presPinViewX = x; activeItem.presPinViewY = y; activeItem.presPinViewScale = scale; - }}>Update</div> : (null)}; + }}>Update</div> : (null)} </div> <div style={{ display: activeItem.presPinView ? "block" : "none" }}> <div className="ribbon-doubleButton" style={{ marginRight: 10 }}> diff --git a/src/fields/util.ts b/src/fields/util.ts index 9e5890aa8..2ff966e7e 100644 --- a/src/fields/util.ts +++ b/src/fields/util.ts @@ -362,7 +362,7 @@ export function updateFunction(target: any, prop: any, value: any, receiver: any const oldValue = current; const newValue = ObjectField.MakeCopy(value); current = newValue; - if (!(value instanceof CursorField) && !(value?.some((v: any) => v instanceof CursorField))) { + if (!(value instanceof CursorField) && !(value?.some?.((v: any) => v instanceof CursorField))) { UndoManager.AddEvent({ redo() { receiver[prop] = newValue; }, undo() { receiver[prop] = oldValue; } |