aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2024-10-04 22:02:23 -0400
committerbobzel <zzzman@gmail.com>2024-10-04 22:02:23 -0400
commit1b038112b37c02d81431bc7ff622b25bb42a0858 (patch)
treebfa468f7b6b913d0177a880b1fb7a18b9111c78b /src
parent2012b3ade1d4644115e3a59cf0a1deec07e23637 (diff)
from last
Diffstat (limited to 'src')
-rw-r--r--src/client/documents/DocUtils.ts2
-rw-r--r--src/client/util/DocumentManager.ts8
-rw-r--r--src/client/views/nodes/DataVizBox/DataVizBox.tsx2
3 files changed, 2 insertions, 10 deletions
diff --git a/src/client/documents/DocUtils.ts b/src/client/documents/DocUtils.ts
index 0699ea09f..1130a9ae8 100644
--- a/src/client/documents/DocUtils.ts
+++ b/src/client/documents/DocUtils.ts
@@ -1,5 +1,3 @@
-/* eslint-disable prefer-destructuring */
-/* eslint-disable default-param-last */
/* eslint-disable no-use-before-define */
import { IconProp } from '@fortawesome/fontawesome-svg-core';
import { saveAs } from 'file-saver';
diff --git a/src/client/util/DocumentManager.ts b/src/client/util/DocumentManager.ts
index 966731656..4ab2e8d05 100644
--- a/src/client/util/DocumentManager.ts
+++ b/src/client/util/DocumentManager.ts
@@ -142,13 +142,7 @@ export class DocumentManager {
}
public getDocViewIndex(target: Doc): number {
- const docViewArray = DocumentManager.Instance.DocumentViews;
- for (let i = 0; i < docViewArray.length; ++i){
- if (docViewArray[i].Document == target){
- return i;
- }
- }
- return -1;
+ return DocumentManager.Instance.DocumentViews.findIndex(dv => dv.Document === target);
}
public getLightboxDocumentView = (toFind: Doc): DocumentView | undefined => {
diff --git a/src/client/views/nodes/DataVizBox/DataVizBox.tsx b/src/client/views/nodes/DataVizBox/DataVizBox.tsx
index a44014444..896048ab3 100644
--- a/src/client/views/nodes/DataVizBox/DataVizBox.tsx
+++ b/src/client/views/nodes/DataVizBox/DataVizBox.tsx
@@ -513,7 +513,7 @@ export class DataVizBox extends ViewBoxAnnotatableComponent<FieldViewProps>() {
DocCreatorMenu.Instance.setTemplateDocs(this.getPossibleTemplates());
};
- specificContextMenu = (e: MouseEventHandler) => {
+ specificContextMenu = (e: React.MouseEvent) => {
const cm = ContextMenu.Instance;
const options = cm.findByDescription('Options...');
const optionItems = options?.subitems ?? [];