aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/formattedText/FormattedTextBox.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/nodes/formattedText/FormattedTextBox.tsx')
-rw-r--r--src/client/views/nodes/formattedText/FormattedTextBox.tsx12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/client/views/nodes/formattedText/FormattedTextBox.tsx b/src/client/views/nodes/formattedText/FormattedTextBox.tsx
index ce54bf57f..b4fbda9f4 100644
--- a/src/client/views/nodes/formattedText/FormattedTextBox.tsx
+++ b/src/client/views/nodes/formattedText/FormattedTextBox.tsx
@@ -105,7 +105,6 @@ export class FormattedTextBox extends ViewBoxAnnotatableComponent<(FieldViewProp
private _disposers: { [name: string]: IReactionDisposer } = {};
private _dropDisposer?: DragManager.DragDropDisposer;
private _recordingStart: number = 0;
- private _pause: boolean = false;
private _ignoreScroll = false;
@computed get _recording() { return this.dataDoc?.audioState === "recording"; }
@@ -1649,6 +1648,9 @@ export class FormattedTextBox extends ViewBoxAnnotatableComponent<(FieldViewProp
sidebarContentScaling = () => (this.props.scaling?.() || 1) * NumCast(this.layoutDoc._viewScale, 1);
fitToBox = () => this.props.Document._fitToBox;
+ sidebarAddDocument = (doc: Doc | Doc[]) => this.addDocument(doc, this.SidebarKey);
+ sidebarMoveDocument = (doc: Doc | Doc[], targetCollection: Doc, addDocument: (doc: Doc | Doc[]) => boolean) => this.moveDocument(doc, targetCollection, addDocument, this.SidebarKey);
+ sidebarRemDocument = (doc: Doc | Doc[]) => this.removeDocument(doc, this.SidebarKey);
@computed get sidebarCollection() {
const collectionProps: SubCollectionViewProps & collectionFreeformViewProps = {
...OmitKeys(this.props, ["NativeWidth", "NativeHeight"]).omit,
@@ -1660,16 +1662,16 @@ export class FormattedTextBox extends ViewBoxAnnotatableComponent<(FieldViewProp
yMargin: 0,
chromeStatus: "enabled",
scaleField: this.SidebarKey + "-scale",
- isAnnotationOverlay: true,
+ isAnnotationOverlay: false,
fieldKey: this.SidebarKey,
fitContentsToDoc: this.fitToBox,
select: emptyFunction,
active: this.annotationsActive,
scaling: this.sidebarContentScaling,
whenActiveChanged: this.whenActiveChanged,
- removeDocument: this.removeDocument,
- moveDocument: this.moveDocument,
- addDocument: this.addDocument,
+ removeDocument: this.sidebarRemDocument,
+ moveDocument: this.sidebarMoveDocument,
+ addDocument: this.sidebarAddDocument,
CollectionView: undefined,
ScreenToLocalTransform: this.sidebarScreenToLocal,
renderDepth: this.props.renderDepth + 1,