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.
2 lines
570 B
2 lines
570 B
import{r as a,j as e}from"../../../jsx-runtime-2e2d9038.js";import{D as c}from"../../../cjs-ff7eb0e1.js";import{BallPiece as p}from"./BallPiece.tsx-1b2eb023.js";import"../../../index-ca121481.js";function d({onMoved:r,ball:o,onRemove:i}){const t=a.useRef(null),n=o.rightRatio,s=o.bottomRatio;return e.jsx(c,{onStop:()=>r(t.current.getBoundingClientRect()),nodeRef:t,children:e.jsx("div",{className:"ball-div",ref:t,tabIndex:0,onKeyUp:l=>{l.key=="Delete"&&i()},style:{position:"absolute",left:`${n*100}%`,top:`${s*100}%`},children:e.jsx(p,{})})})}export{d as CourtBall};
|