|
|
|
@ -22,10 +22,7 @@ import { PlayerPiece } from "../components/editor/PlayerPiece"
|
|
|
|
|
import { Tactic, TacticComponent, TacticContent } from "../model/tactic/Tactic"
|
|
|
|
|
import { fetchAPI } from "../Fetcher"
|
|
|
|
|
|
|
|
|
|
import SavingState, {
|
|
|
|
|
SaveState,
|
|
|
|
|
SaveStates,
|
|
|
|
|
} from "../components/editor/SavingState"
|
|
|
|
|
import SavingState, { SaveState, SaveStates } from "../components/editor/SavingState"
|
|
|
|
|
|
|
|
|
|
import { BALL_TYPE } from "../model/tactic/CourtObjects"
|
|
|
|
|
import { CourtAction } from "../components/editor/CourtAction"
|
|
|
|
@ -42,32 +39,16 @@ import {
|
|
|
|
|
removeBall,
|
|
|
|
|
updateComponent,
|
|
|
|
|
} from "../editor/TacticContentDomains"
|
|
|
|
|
import {
|
|
|
|
|
BallState,
|
|
|
|
|
Player,
|
|
|
|
|
PlayerInfo,
|
|
|
|
|
PlayerLike,
|
|
|
|
|
PlayerTeam,
|
|
|
|
|
} from "../model/tactic/Player"
|
|
|
|
|
import { BallState, Player, PlayerInfo, PlayerLike, PlayerTeam } from "../model/tactic/Player"
|
|
|
|
|
import { RackedCourtObject, RackedPlayer } from "../editor/RackedItems"
|
|
|
|
|
import CourtPlayer from "../components/editor/CourtPlayer"
|
|
|
|
|
import {
|
|
|
|
|
createAction,
|
|
|
|
|
getActionKind,
|
|
|
|
|
isActionValid,
|
|
|
|
|
removeAction,
|
|
|
|
|
} from "../editor/ActionsDomains"
|
|
|
|
|
import { createAction, getActionKind, isActionValid, removeAction } from "../editor/ActionsDomains"
|
|
|
|
|
import ArrowAction from "../components/actions/ArrowAction"
|
|
|
|
|
import { middlePos, Pos, ratioWithinBase } from "../geo/Pos"
|
|
|
|
|
import { Action, ActionKind } from "../model/tactic/Action"
|
|
|
|
|
import BallAction from "../components/actions/BallAction"
|
|
|
|
|
import {
|
|
|
|
|
changePlayerBallState,
|
|
|
|
|
getOrigin,
|
|
|
|
|
removePlayer,
|
|
|
|
|
} from "../editor/PlayerDomains"
|
|
|
|
|
import { changePlayerBallState, getOrigin, removePlayer } from "../editor/PlayerDomains"
|
|
|
|
|
import { CourtBall } from "../components/editor/CourtBall"
|
|
|
|
|
import { BASE } from "../Constants"
|
|
|
|
|
|
|
|
|
|
const ERROR_STYLE: CSSProperties = {
|
|
|
|
|
borderColor: "red",
|
|
|
|
@ -439,9 +420,6 @@ function EditorView({
|
|
|
|
|
return (
|
|
|
|
|
<div id="main-div">
|
|
|
|
|
<div id="topbar-div">
|
|
|
|
|
<button onClick={() => (location.pathname = BASE + "/")}>
|
|
|
|
|
Home
|
|
|
|
|
</button>
|
|
|
|
|
<div id="topbar-left">
|
|
|
|
|
<SavingState state={saveState} />
|
|
|
|
|
</div>
|
|
|
|
|