aboutsummaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
Diffstat (limited to 'src/client')
-rw-r--r--src/client/views/collections/collectionFreeForm/MarqueeOptionsMenu.tsx4
-rw-r--r--src/client/views/collections/collectionFreeForm/MarqueeView.tsx16
2 files changed, 12 insertions, 8 deletions
diff --git a/src/client/views/collections/collectionFreeForm/MarqueeOptionsMenu.tsx b/src/client/views/collections/collectionFreeForm/MarqueeOptionsMenu.tsx
index b94a22d04..44c916ab9 100644
--- a/src/client/views/collections/collectionFreeForm/MarqueeOptionsMenu.tsx
+++ b/src/client/views/collections/collectionFreeForm/MarqueeOptionsMenu.tsx
@@ -18,10 +18,10 @@ export class MarqueeOptionsMenu extends AntimodeMenu<AntimodeMenuProps> {
public showMarquee: () => void = unimplementedFunction;
public hideMarquee: () => void = unimplementedFunction;
public pinWithView: (e: KeyboardEvent | React.PointerEvent | undefined) => void = unimplementedFunction;
- public classifyImages: (e: React.MouseEvent | undefined) => void = unimplementedFunction;
+ public classifyImages: () => void = unimplementedFunction;
public groupImages: () => void = unimplementedFunction;
public isShown = () => this._opacity > 0;
- constructor(props: any) {
+ constructor(props: AntimodeMenuProps) {
super(props);
makeObservable(this);
MarqueeOptionsMenu.Instance = this;
diff --git a/src/client/views/collections/collectionFreeForm/MarqueeView.tsx b/src/client/views/collections/collectionFreeForm/MarqueeView.tsx
index 6fee076ee..6cc75aa4b 100644
--- a/src/client/views/collections/collectionFreeForm/MarqueeView.tsx
+++ b/src/client/views/collections/collectionFreeForm/MarqueeView.tsx
@@ -156,6 +156,7 @@ export class MarqueeView extends ObservableReactComponent<SubCollectionViewProps
} else if (e.key === 'b' && e.ctrlKey) {
document.body.focus(); // so that we can access the clipboard without an error
setTimeout(() =>
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
pasteImageBitmap((data: any, error: any) => {
error && console.log(error);
data &&
@@ -432,7 +433,7 @@ export class MarqueeView extends ObservableReactComponent<SubCollectionViewProps
* Classifies images and assigns the labels as document fields.
*/
@undoBatch
- classifyImages = action(async (e: React.MouseEvent | undefined) => {
+ classifyImages = action(async () => {
const groupButton = DocListCast(Doc.MyLeftSidebarMenu.data).find(d => d.target === Doc.MyImageGrouper);
if (groupButton) {
this._selectedDocs = this.marqueeSelect(false, DocumentType.IMG);
@@ -515,13 +516,14 @@ export class MarqueeView extends ObservableReactComponent<SubCollectionViewProps
@action
marqueeCommand = (e: KeyboardEvent) => {
- if (this._commandExecuted || (e as any).propagationIsStopped) {
+ const ee = e as unknown as KeyboardEvent & { propagationIsStopped?: boolean };
+ if (this._commandExecuted || ee.propagationIsStopped) {
return;
}
if (e.key === 'Backspace' || e.key === 'Delete' || e.key === 'd' || e.key === 'h') {
this._commandExecuted = true;
e.stopPropagation();
- (e as any).propagationIsStopped = true;
+ ee.propagationIsStopped = true;
this.delete(e, e.key === 'h');
e.stopPropagation();
}
@@ -529,7 +531,7 @@ export class MarqueeView extends ObservableReactComponent<SubCollectionViewProps
this._commandExecuted = true;
e.stopPropagation();
e.preventDefault();
- (e as any).propagationIsStopped = true;
+ ee.propagationIsStopped = true;
if (e.key === 'g') this.collection(e, true);
if (e.key === 'c' || e.key === 't') this.collection(e);
if (e.key === 's' || e.key === 'S') this.summary();
@@ -660,8 +662,9 @@ export class MarqueeView extends ObservableReactComponent<SubCollectionViewProps
*/
@action
onDragMovePause = (e: CustomEvent<React.DragEvent>) => {
- if ((e as any).handlePan || this._props.isAnnotationOverlay) return;
- (e as any).handlePan = true;
+ const ee = e as CustomEvent<React.DragEvent> & { handlePan?: boolean };
+ if (ee.handlePan || this._props.isAnnotationOverlay) return;
+ ee.handlePan = true;
const bounds = this.MarqueeRef?.getBoundingClientRect();
if (!this._props.Document._freeform_noAutoPan && !this._props.renderDepth && bounds) {
@@ -682,6 +685,7 @@ export class MarqueeView extends ObservableReactComponent<SubCollectionViewProps
<div
className="marqueeView"
ref={r => {
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
r?.addEventListener('dashDragMovePause', this.onDragMovePause as any);
this.MarqueeRef = r;
}}