diff --git a/packages/victory-tooltip/src/flyout.test.tsx b/packages/victory-tooltip/src/flyout.test.tsx index ff19af89a..811d1a07f 100644 --- a/packages/victory-tooltip/src/flyout.test.tsx +++ b/packages/victory-tooltip/src/flyout.test.tsx @@ -15,7 +15,6 @@ describe("victory-primitives/flyout", () => { cornerRadius: 5, pointerLength: 10, pointerWidth: 10, - // center: { x: 100, y: 100 }, }; describe("rendering", () => { it("renders a flyout path", () => { diff --git a/packages/victory-tooltip/src/flyout.tsx b/packages/victory-tooltip/src/flyout.tsx index 64cb4198e..bc1615307 100644 --- a/packages/victory-tooltip/src/flyout.tsx +++ b/packages/victory-tooltip/src/flyout.tsx @@ -12,8 +12,8 @@ import { export interface FlyoutProps extends VictoryCommonProps { active?: boolean; center?: { - x?: number; - y?: number; + x: number; + y: number; }; className?: string; clipPath?: string; @@ -147,19 +147,13 @@ export const Flyout: React.FC = (initialProps) => { // check for required props for this subcomponent // they should be passed in from the wrapper - // UserProps.assert(props.center, "Flyout props[center] is undefined"); UserProps.assert(props.height, "Flyout props[height] is undefined"); UserProps.assert(props.width, "Flyout props[width] is undefined"); UserProps.assert(props.x, "Flyout props[x] is undefined"); UserProps.assert(props.y, "Flyout props[y] is undefined"); - // const { x: centerX, y: centerY } = props.center; - - // UserProps.assert(centerX, "Flyout props[center.x] is undefined"); - // UserProps.assert(centerY, "Flyout props[center.y] is undefined"); - const flyoutPathProps: FlyoutPathProps = { - center: props.center, + center: props.center || { x: 0, y: 0 }, cornerRadius: props.cornerRadius || 0, dx: props.dx, dy: props.dy,