@@ -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