From dacd82c42c26c08356b853ea65c4f30f28ac1f2c Mon Sep 17 00:00:00 2001 From: Aleksandar Petrov <8142643+aleks-p@users.noreply.github.com> Date: Thu, 4 Dec 2025 09:20:32 -0400 Subject: [PATCH] Fix a few TS errors --- public/app/features/explore-map/components/ExploreMapCanvas.tsx | 2 -- .../features/explore-map/components/ExploreMapStickyNote.tsx | 1 - public/app/features/explore-map/hooks/useCanvasPersistence.ts | 1 + public/app/features/explore-map/state/selectors.ts | 2 ++ 4 files changed, 3 insertions(+), 3 deletions(-) diff --git a/public/app/features/explore-map/components/ExploreMapCanvas.tsx b/public/app/features/explore-map/components/ExploreMapCanvas.tsx index 98790292b1a..fbf1d07a489 100644 --- a/public/app/features/explore-map/components/ExploreMapCanvas.tsx +++ b/public/app/features/explore-map/components/ExploreMapCanvas.tsx @@ -37,7 +37,6 @@ export function ExploreMapCanvas() { const [isSelecting, setIsSelecting] = useState(false); const justCompletedSelectionRef = useRef(false); const [containerSize, setContainerSize] = useState({ width: 0, height: 0 }); - const transformWrapperRef = useRef(null); const panels = useSelector((state) => selectPanels(state.exploreMapCRDT)); const frames = useSelector((state) => selectFrames(state.exploreMapCRDT)); @@ -74,7 +73,6 @@ export function ExploreMapCanvas() { let height = 0; while (element) { - const computedStyle = window.getComputedStyle(element); const elementHeight = element.clientHeight; const elementWidth = element.clientWidth; diff --git a/public/app/features/explore-map/components/ExploreMapStickyNote.tsx b/public/app/features/explore-map/components/ExploreMapStickyNote.tsx index 756ed2fb3a9..08ab76b0b98 100644 --- a/public/app/features/explore-map/components/ExploreMapStickyNote.tsx +++ b/public/app/features/explore-map/components/ExploreMapStickyNote.tsx @@ -5,7 +5,6 @@ import { Rnd, RndDragCallback, RndResizeCallback } from 'react-rnd'; import { GrafanaTheme2 } from '@grafana/data'; import { t } from '@grafana/i18n'; import { Button, TextArea, useStyles2 } from '@grafana/ui'; -import { contextSrv } from 'app/core/services/context_srv'; import { useDispatch } from 'app/types/store'; import { diff --git a/public/app/features/explore-map/hooks/useCanvasPersistence.ts b/public/app/features/explore-map/hooks/useCanvasPersistence.ts index 5de43a4d207..a9aff7033a4 100644 --- a/public/app/features/explore-map/hooks/useCanvasPersistence.ts +++ b/public/app/features/explore-map/hooks/useCanvasPersistence.ts @@ -241,6 +241,7 @@ export function useCanvasPersistence(options: UseMapPersistenceOptions = {}) { selectedPanelIds: [], nextZIndex: 1, cursors: {}, + cursorMode: 'pointer', // Store the raw CRDT state for proper sync across sessions crdtState: crdtState.crdtStateJSON ? JSON.parse(crdtState.crdtStateJSON) : undefined, }; diff --git a/public/app/features/explore-map/state/selectors.ts b/public/app/features/explore-map/state/selectors.ts index ba2a935abcf..e8b0578037f 100644 --- a/public/app/features/explore-map/state/selectors.ts +++ b/public/app/features/explore-map/state/selectors.ts @@ -60,6 +60,7 @@ export const selectPanels = createSelector( viewport: { zoom: 1, panX: 0, panY: 0 }, selectedPanelIds: [], cursors: {}, + cursorMode: 'pointer', isOnline: false, isSyncing: false, }, @@ -151,6 +152,7 @@ export const selectFrames = createSelector( viewport: { zoom: 1, panX: 0, panY: 0 }, selectedPanelIds: [], cursors: {}, + cursorMode: 'pointer', isOnline: false, isSyncing: false, },