You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
690 B
26 lines
690 B
import {Action} from "../../tactic/Action"
|
|
import BendableArrow from "../../components/arrows/BendableArrow"
|
|
|
|
export interface CourtActionProps {
|
|
action: Action
|
|
onActionChanges: (a: Action) => void
|
|
}
|
|
|
|
export function CourtAction({
|
|
action,
|
|
onActionChanges,
|
|
}: CourtActionProps) {
|
|
|
|
return (
|
|
<BendableArrow
|
|
startPos={action.moveFrom}
|
|
segments={action.segments}
|
|
onSegmentsChanges={(edges) => {
|
|
onActionChanges({...action, segments: edges})
|
|
}}
|
|
endRadius={26}
|
|
startRadius={26}
|
|
/>
|
|
)
|
|
}
|