Skip to content

Build your personal knowledge base with Trilium Notes

fix(relation_map): drop the zoom viewport's focus ring

Elian Doran66d268d60213
diff --git a/apps/client/src/widgets/type_widgets/relation_map/RelationMap.css b/apps/client/src/widgets/type_widgets/relation_map/RelationMap.css
index 4de86c3790..afb42ca9a1 100644
--- a/apps/client/src/widgets/type_widgets/relation_map/RelationMap.css
+++ b/apps/client/src/widgets/type_widgets/relation_map/RelationMap.css
@@ -22,6 +22,10 @@
height: 100%;
}
+.relation-map-viewport {
+ outline: none;
+}
+
.note-detail-relation-map .relation-map-connections {
position: absolute;
top: 0;
diff --git a/apps/client/src/widgets/type_widgets/relation_map/RelationMap.tsx b/apps/client/src/widgets/type_widgets/relation_map/RelationMap.tsx
index 9a054172a9..e0a39a17dc 100644
--- a/apps/client/src/widgets/type_widgets/relation_map/RelationMap.tsx
+++ b/apps/client/src/widgets/type_widgets/relation_map/RelationMap.tsx
@@ -17,7 +17,7 @@ import toast from "../../../services/toast";
import { isMobile } from "../../../services/utils";
import { useEditorSpacedUpdate, useNoteLabelBoolean, useTriliumEvent, useTriliumEvents } from "../../react/hooks";
import { useZoomPanPinch, useZoomPanWheel } from "../../react/zoom_pan";
-import { useZoomPanKeyboard, ZOOM_PAN_VIEWPORT_CLASS } from "../../react/zoom_pan_keyboard";
+import { useZoomPanKeyboard } from "../../react/zoom_pan_keyboard";
import { TypeWidgetProps } from "../type_widget";
import RelationMapApi, { ClientRelation, MapData, MapDataNoteEntry, MapTransform } from "./api";
import Connections from "./Connections";
@@ -282,7 +282,7 @@ export function MapViewport({ zoom, viewportRef, children }: {
children: ComponentChildren;
}) {
return (
- <div ref={viewportRef} className={clsx("relation-map-viewport", ZOOM_PAN_VIEWPORT_CLASS)} tabIndex={0}>
+ <div ref={viewportRef} className="relation-map-viewport" tabIndex={0}>
<TransformWrapper
ref={zoom.ref}
minScale={MIN_SCALE}