diff options
| author | Bob Zeleznik <zzzman@gmail.com> | 2020-04-08 12:17:46 -0400 |
|---|---|---|
| committer | Bob Zeleznik <zzzman@gmail.com> | 2020-04-08 12:17:46 -0400 |
| commit | 097a3af816b540082bfe370816ced74126d5c96e (patch) | |
| tree | cb3ad2def2a03fcb49b75648336707bd3e43c437 /src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx | |
| parent | d34cb78c3d42f946be62a06bed73fe1997bb25ab (diff) | |
fixed annotation overlays broken from previous changes for images/pdfs/etc
Diffstat (limited to 'src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx')
| -rw-r--r-- | src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx index df1373b14..146ec9f7d 100644 --- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx +++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx @@ -66,9 +66,12 @@ export const panZoomSchema = createSchema({ type PanZoomDocument = makeInterface<[typeof panZoomSchema, typeof documentSchema, typeof positionSchema, typeof pageSchema]>; const PanZoomDocument = makeInterface(panZoomSchema, documentSchema, positionSchema, pageSchema); +export type collectionFreeformViewProps = { + forceScaling?:boolean; // whether to force scaling of content (needed by ImageBox) +}; @observer -export class CollectionFreeFormView extends CollectionSubView(PanZoomDocument) { +export class CollectionFreeFormView extends CollectionSubView(PanZoomDocument, undefined as any as collectionFreeformViewProps) { private _lastX: number = 0; private _lastY: number = 0; private _inkToTextStartX: number | undefined; @@ -1127,7 +1130,7 @@ export class CollectionFreeFormView extends CollectionSubView(PanZoomDocument) { } @computed get contentScaling() { - if (this.props.annotationsKey) return 0; + if (this.props.annotationsKey && !this.props.forceScaling) return 0; const nw = NumCast(this.Document._nativeWidth, this.props.NativeWidth()); const nh = NumCast(this.Document._nativeHeight, this.props.NativeHeight()); const hscale = nh ? this.props.PanelHeight() / nh : 1; |
