refactor: rename component SelectionBox to Selection

This commit is contained in:
trafficlunar 2025-01-24 13:21:53 +00:00
parent a9baef3164
commit 9873c068e8
2 changed files with 4 additions and 4 deletions

View file

@ -13,7 +13,7 @@ import { useTextures } from "@/hooks/useTextures";
import Blocks from "./Blocks";
import Cursor from "./Cursor";
import SelectionBox from "./SelectionBox";
import Selection from "./Selection";
import Grid from "./Grid";
import CanvasBorder from "./CanvasBorder";
@ -489,7 +489,7 @@ function Canvas() {
<Container x={coords.x} y={coords.y} scale={scale}>
{settings.canvasBorder && <CanvasBorder canvasSize={canvasSize} isDark={isDark} />}
<Cursor mouseCoords={mouseCoords} radius={radius} isDark={isDark} />
<SelectionBox selection={selectionCoords} coords={coords} scale={scale} isDark={isDark} />
<Selection selection={selectionCoords} coords={coords} scale={scale} isDark={isDark} />
</Container>
{settings.grid && (

View file

@ -12,7 +12,7 @@ interface Props {
const shader = new DashLineShader({ dash: 8, gap: 5 });
function SelectionBox({ selection, coords, scale, isDark }: Props) {
function Selection({ selection, coords, scale, isDark }: Props) {
const app = useApp();
const selectionRef = useRef<SmoothGraphics>();
@ -70,4 +70,4 @@ function SelectionBox({ selection, coords, scale, isDark }: Props) {
return null;
}
export default SelectionBox;
export default Selection;