aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/collectionFreeForm
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2019-11-18 21:44:22 -0500
committerBob Zeleznik <zzzman@gmail.com>2019-11-18 21:44:22 -0500
commit6de325def7e6a187d718fb3be77581c44fbd41db (patch)
tree4d97a3445bc27f328778f2c178b9b7f69126e9aa /src/client/views/collections/collectionFreeForm
parent2b1643c4a4206f1abde8b70c2e70d17a974309e4 (diff)
more fixes to pdfs etc.
Diffstat (limited to 'src/client/views/collections/collectionFreeForm')
-rw-r--r--src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
index a1559e049..985d1d272 100644
--- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
+++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
@@ -851,6 +851,13 @@ export class CollectionFreeFormView extends CollectionSubView(PanZoomDocument) {
);
}
+ children = () => {
+ let eles: JSX.Element[] = [];
+ this.currentStroke && (eles.push(this.currentStroke));
+ this.extensionDoc && (eles.push(...this.childViews()));
+ eles.push(<CollectionFreeFormRemoteCursors {...this.props} key="remoteCursors" />);
+ return eles;
+ }
render() {
trace();
// update the actual dimensions of the collection so that they can inquired (e.g., by a minimap)
@@ -868,9 +875,7 @@ export class CollectionFreeFormView extends CollectionSubView(PanZoomDocument) {
addLiveTextDocument={this.addLiveTextBox} getContainerTransform={this.getContainerTransform} getTransform={this.getTransform} isAnnotationOverlay={this.isAnnotationOverlay}>
<CollectionFreeFormViewPannableContents centeringShiftX={this.centeringShiftX} centeringShiftY={this.centeringShiftY}
easing={this.easing} zoomScaling={this.zoomScaling} panX={this.panX} panY={this.panY}>
- {!this.extensionDoc ? (null) : this.childViews()}
- {this.currentStroke}
- <CollectionFreeFormRemoteCursors {...this.props} key="remoteCursors" />
+ {this.children}
</CollectionFreeFormViewPannableContents>
</MarqueeView>
{this.overlayViews}
@@ -885,6 +890,7 @@ interface CollectionFreeFormViewPannableContentsProps {
panY: () => number;
zoomScaling: () => number;
easing: () => boolean;
+ children: () => JSX.Element[];
}
@observer
@@ -897,7 +903,7 @@ class CollectionFreeFormViewPannableContents extends React.Component<CollectionF
const pany = -this.props.panY();
const zoom = this.props.zoomScaling();
return <div className={freeformclass} style={{ borderRadius: "inherit", transform: `translate(${cenx}px, ${ceny}px) scale(${zoom}) translate(${panx}px, ${pany}px)` }}>
- {this.props.children}
+ {this.props.children()}
</div>;
}
} \ No newline at end of file