aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/ImageBox.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2025-01-07 01:24:55 -0500
committerbobzel <zzzman@gmail.com>2025-01-07 01:24:55 -0500
commit93ee735e435de5949a0eec54c07537c4de2eedf4 (patch)
tree2a9aaea1a4deaea5500e45ab890536b593f74ca0 /src/client/views/nodes/ImageBox.tsx
parent68af8fffb3111870dd84d4280fdd73b05832dfd2 (diff)
fixed pdfs/marqueeAnnotator so that you can add rectangle annotations.
Diffstat (limited to 'src/client/views/nodes/ImageBox.tsx')
-rw-r--r--src/client/views/nodes/ImageBox.tsx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/views/nodes/ImageBox.tsx b/src/client/views/nodes/ImageBox.tsx
index 423a73f44..de8a9ad21 100644
--- a/src/client/views/nodes/ImageBox.tsx
+++ b/src/client/views/nodes/ImageBox.tsx
@@ -39,7 +39,6 @@ import { FocusViewOptions } from './FocusViewOptions';
import './ImageBox.scss';
import { OpenWhere } from './OpenWhere';
import { Upload } from '../../../server/SharedMediaTypes';
-import { ImageUtils } from '../../util/Import & Export/ImageUtils';
export class ImageEditorData {
// eslint-disable-next-line no-use-before-define
@@ -268,7 +267,7 @@ export class ImageBox extends ViewBoxAnnotatableComponent<FieldViewProps>() {
const anchy = NumCast(cropping.y);
const anchw = NumCast(cropping._width);
const anchh = NumCast(cropping._height);
- const viewScale = NumCast(this.dataDoc[this.fieldKey + '_nativeWidth']) / anchw;
+ const viewScale = NumCast(this.dataDoc[this.fieldKey + '_nativeHeight']) / anchh;
cropping.title = 'crop: ' + this.Document.title;
cropping.x = NumCast(this.Document.x) + NumCast(this.layoutDoc._width);
cropping.y = NumCast(this.Document.y);
@@ -286,9 +285,9 @@ export class ImageBox extends ViewBoxAnnotatableComponent<FieldViewProps>() {
croppingProto.data_nativeWidth = anchw;
croppingProto.data_nativeHeight = anchh;
croppingProto.freeform_scale = viewScale;
- croppingProto.freeform_scale_min = viewScale;
croppingProto.freeform_panX = anchx / viewScale;
croppingProto.freeform_panY = anchy / viewScale;
+ croppingProto.freeform_scale_min = viewScale;
croppingProto.freeform_panX_min = anchx / viewScale;
croppingProto.freeform_panX_max = anchw / viewScale;
croppingProto.freeform_panY_min = anchy / viewScale;
@@ -593,6 +592,7 @@ export class ImageBox extends ViewBoxAnnotatableComponent<FieldViewProps>() {
annotationLayerScrollTop={0}
scaling={returnOne}
annotationLayerScaling={this._props.NativeDimScaling}
+ screenTransform={this.DocumentView().screenToViewTransform}
docView={this.DocumentView}
addDocument={this.addDocument}
finishMarquee={this.finishMarquee}