Skip to content

Commit

Permalink
chore: code review tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
kswenson committed Oct 22, 2024
1 parent 3eb80cd commit 2d547ff
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions v3/src/components/drag-drop/attribute-drag-overlay.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { DragOverlay, Modifiers, useDndContext } from "@dnd-kit/core"
import { DragOverlay, Modifier, Modifiers, useDndContext } from "@dnd-kit/core"
import React, { CSSProperties } from "react"
import { getDragAttributeInfo } from "../../hooks/use-drag-drop"

Expand Down Expand Up @@ -28,14 +28,14 @@ export function AttributeDragOverlay ({ activeDragId, overlayHeight, overlayWidt
? { height: `${overlayHeight}px`, width: `${overlayWidth}px` } : undefined

// Drags initiated by plugins have to be offset based on the location of the plugin
const modifier = (xOffset || yOffset) && ((args: any) => {
const modifier: Modifier | undefined = (xOffset || yOffset) ? (args => {
const { x, y, scaleX, scaleY } = args.transform
return {

Check warning on line 33 in v3/src/components/drag-drop/attribute-drag-overlay.tsx

View check run for this annotation

Codecov / codecov/patch

v3/src/components/drag-drop/attribute-drag-overlay.tsx#L32-L33

Added lines #L32 - L33 were not covered by tests
x: x + (xOffset ?? 0),
y: y + (yOffset ?? 0),
scaleX, scaleY
}
})
}) : undefined
const modifiers: Modifiers | undefined = modifier ? [modifier] : undefined

return (
Expand Down

0 comments on commit 2d547ff

Please sign in to comment.