aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/MarqueeAnnotator.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2024-01-22 21:45:28 -0500
committerbobzel <zzzman@gmail.com>2024-01-22 21:45:28 -0500
commit001127c07f95173d7036db19d07dcfb1135f3caa (patch)
tree6489446110038835536f1916791cfe6faa793bc3 /src/client/views/MarqueeAnnotator.tsx
parent953a298b49c2345741fd7989f9b62cadd76eea52 (diff)
fixed schema rows to render, fix for resizing docs from left side. all locking docs in non freeform view. fix for labelBox with multiple rows to keep top rows. cleaned up docViewPath/containerViewPath &
Diffstat (limited to 'src/client/views/MarqueeAnnotator.tsx')
-rw-r--r--src/client/views/MarqueeAnnotator.tsx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/views/MarqueeAnnotator.tsx b/src/client/views/MarqueeAnnotator.tsx
index cfdc648b4..d0516336c 100644
--- a/src/client/views/MarqueeAnnotator.tsx
+++ b/src/client/views/MarqueeAnnotator.tsx
@@ -66,7 +66,7 @@ export class MarqueeAnnotator extends ObservableReactComponent<MarqueeAnnotatorP
const savedAnnoMap = savedAnnotations?.values() && Array.from(savedAnnotations?.values()).length ? savedAnnotations : this.props.savedAnnotations();
if (savedAnnoMap.size === 0) return undefined;
const savedAnnos = Array.from(savedAnnoMap.values())[0];
- const doc = this.props.docView().Document;
+ const doc = this.props.Document;
const scale = (this.props.annotationLayerScaling?.() || 1) * NumCast(doc._freeform_scale, 1);
if (savedAnnos.length && (savedAnnos[0] as any).marqueeing) {
const anno = savedAnnos[0];
@@ -227,7 +227,7 @@ export class MarqueeAnnotator extends ObservableReactComponent<MarqueeAnnotatorP
dragComplete: e => {
if (!e.aborted && e.linkDocument) {
Doc.GetProto(e.linkDocument).link_relationship = 'cropped image';
- Doc.GetProto(e.linkDocument).title = 'crop: ' + this.props.docView().Document.title;
+ Doc.GetProto(e.linkDocument).title = 'crop: ' + this.props.Document.title;
Doc.GetProto(e.linkDocument).link_displayLine = false;
}
},
@@ -256,7 +256,7 @@ export class MarqueeAnnotator extends ObservableReactComponent<MarqueeAnnotatorP
// configure and show the annotation/link menu if a the drag region is big enough
// copy the temporary marquee to allow for multiple selections (not currently available though).
const copy = document.createElement('div');
- const scale = (this.props.scaling?.() || 1) * NumCast(this.props.docView().Document._freeform_scale, 1);
+ const scale = (this.props.scaling?.() || 1) * NumCast(this.props.Document._freeform_scale, 1);
['border', 'opacity', 'top', 'left', 'width', 'height'].forEach(prop => (copy.style[prop as any] = marqueeStyle[prop as any]));
copy.className = 'marqueeAnnotator-annotationBox';
copy.style.top = parseInt(marqueeStyle.top.toString().replace('px', '')) / scale + this.props.scrollTop + 'px';