Fix a few TS errors
This commit is contained in:
@@ -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<HTMLDivElement>(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;
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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,
|
||||
};
|
||||
|
||||
@@ -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,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user