Skip to content

Commit 40582b6

Browse files
committed
fix tests
1 parent e8e8c6f commit 40582b6

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

  • apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/widget-playground

apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/widget-playground/page-client.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1181,7 +1181,7 @@ function SwappableWidgetInstanceGrid(props: { gridRef: RefState<WidgetInstanceGr
11811181
onDragStart={(event) => {
11821182
setActiveInstanceId(event.active.id as string);
11831183
setDraggingType("element");
1184-
setActiveElementInitialRect(event.activatorEvent.target.getBoundingClientRect());
1184+
setActiveElementInitialRect((event.activatorEvent.target as any).getBoundingClientRect());
11851185
}}
11861186
onDragAbort={() => {
11871187
setHoverElementSwap(null);
@@ -1242,10 +1242,10 @@ function SwappableWidgetInstanceGrid(props: { gridRef: RefState<WidgetInstanceGr
12421242
const overId = props.gridRef.current.getElementAt(overCoordinates[0], overCoordinates[1]).instance?.id;
12431243
if (overId && overId !== widgetId) {
12441244
setHoverElementSwap([overId, [
1245-
event.over.rect.left - activeElementInitialRect.left,
1246-
event.over.rect.top - activeElementInitialRect.top,
1247-
activeElementInitialRect.width,
1248-
activeElementInitialRect.height,
1245+
event.over.rect.left - activeElementInitialRect!.left,
1246+
event.over.rect.top - activeElementInitialRect!.top,
1247+
activeElementInitialRect!.width,
1248+
activeElementInitialRect!.height,
12491249
event.over.rect.width,
12501250
event.over.rect.height,
12511251
]]);

0 commit comments

Comments
 (0)