rm unused Ball.tsx
continuous-integration/drone/push Build is passing Details

pull/84/head
maxime 1 year ago
parent 59e9cf6503
commit 4298230938

@ -14,7 +14,7 @@ import { Action, ActionKind } from "../../model/tactic/Action"
import ArrowAction from "../actions/ArrowAction" import ArrowAction from "../actions/ArrowAction"
import { middlePos, ratioWithinBase } from "../arrows/Pos" import { middlePos, ratioWithinBase } from "../arrows/Pos"
import BallAction from "../actions/BallAction" import BallAction from "../actions/BallAction"
import { CourtObject } from "../../model/tactic/CourtObjects" import { CourtObject } from "../../model/tactic/Ball"
import { contains } from "../arrows/Box" import { contains } from "../arrows/Box"
import { CourtAction } from "../../views/editor/CourtAction" import { CourtAction } from "../../views/editor/CourtAction"

@ -1,7 +1,7 @@
import React, { useRef } from "react" import React, { useRef } from "react"
import Draggable from "react-draggable" import Draggable from "react-draggable"
import { BallPiece } from "./BallPiece" import { BallPiece } from "./BallPiece"
import { Ball } from "../../model/tactic/CourtObjects" import { Ball } from "../../model/tactic/Ball"
export interface CourtBallProps { export interface CourtBallProps {
onMoved: (rect: DOMRect) => void onMoved: (rect: DOMRect) => void

@ -1,17 +0,0 @@
export type CourtObject = { type: "ball" } & Ball
export interface Ball {
/**
* The ball is a "ball" court object
*/
readonly type: "ball"
/**
* Percentage of the player's position to the bottom (0 means top, 1 means bottom, 0.5 means middle)
*/
readonly bottomRatio: number
/**
* Percentage of the player's position to the right (0 means left, 1 means right, 0.5 means middle)
*/
readonly rightRatio: number
}

@ -1,5 +1,5 @@
import { Player } from "./Player" import { Player } from "./Player"
import { CourtObject } from "./CourtObjects" import { CourtObject } from "./Ball"
import { Action } from "./Action" import { Action } from "./Action"
export interface Tactic { export interface Tactic {

@ -27,7 +27,7 @@ import SavingState, {
SaveStates, SaveStates,
} from "../components/editor/SavingState" } from "../components/editor/SavingState"
import { CourtObject } from "../model/tactic/CourtObjects" import { CourtObject } from "../model/tactic/Ball"
import { CourtAction } from "./editor/CourtAction" import { CourtAction } from "./editor/CourtAction"
import { BasketCourt } from "../components/editor/BasketCourt" import { BasketCourt } from "../components/editor/BasketCourt"
import { ratioWithinBase } from "../components/arrows/Pos" import { ratioWithinBase } from "../components/arrows/Pos"

Loading…
Cancel
Save