From cbe23091b72c472be3e9a6de1cac5325171c282f Mon Sep 17 00:00:00 2001 From: bobzel Date: Thu, 11 Apr 2019 08:51:39 -0400 Subject: fixed zoom not always rendering. fixed documents (images, pdfs) not appearing. fixed lint warnings. --- .../collectionFreeForm/CollectionFreeFormView.tsx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx') diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx index 4e1164ee5..b40e36e77 100644 --- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx +++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx @@ -304,10 +304,12 @@ export class CollectionFreeFormView extends CollectionSubView { childViews = () => this.views; render() { - let [dx, dy] = [this.centeringShiftX, this.centeringShiftY]; - + const [dx, dy] = [this.centeringShiftX, this.centeringShiftY]; const panx: number = -this.props.Document.GetNumber(KeyStore.PanX, 0); const pany: number = -this.props.Document.GetNumber(KeyStore.PanY, 0); + const zoom: number = this.zoomScaling; + const blay = this.backgroundView; + const olay = this.overlayView; return ( runInAction(() => { this._pwidth = r.entry.width; this._pheight = r.entry.height; })}> @@ -323,8 +325,8 @@ export class CollectionFreeFormView extends CollectionSubView {
- {this.backgroundView} + style={{ transform: `translate(${dx}px, ${dy}px) scale(${zoom}, ${zoom}) translate(${panx}px, ${pany}px)` }}> + {blay} {this.childViews} @@ -332,7 +334,7 @@ export class CollectionFreeFormView extends CollectionSubView {
- {this.overlayView} + {olay}
-- cgit v1.2.3-70-g09d2