style: match canvas selected image border and corner handles
Some checks failed
Lint / build (20) (push) Has been cancelled
Playwright Tests / test (push) Has been cancelled

This commit is contained in:
Your Name 2026-02-21 00:22:56 +08:00
parent 8f4afbba40
commit 2f33598e57
2 changed files with 22 additions and 22 deletions

View File

@ -39,7 +39,7 @@ function isNodeInViewport(
export function CanvasWorkspace() { export function CanvasWorkspace() {
const SNAP_THRESHOLD = 10; const SNAP_THRESHOLD = 10;
const SNAP_GAP = 12; const SNAP_GAP = 12;
const SELECTION_COLOR = "#3182ed"; const SELECTION_COLOR = "#27a8ff";
const containerRef = useRef<HTMLDivElement>(null); const containerRef = useRef<HTMLDivElement>(null);
const [isPanning, setIsPanning] = useState(false); const [isPanning, setIsPanning] = useState(false);
const [panStart, setPanStart] = useState<Position>({ x: 0, y: 0 }); const [panStart, setPanStart] = useState<Position>({ x: 0, y: 0 });
@ -698,39 +698,39 @@ export function CanvasWorkspace() {
const imageResizeHandleStyles = isImageNode const imageResizeHandleStyles = isImageNode
? { ? {
topRight: { topRight: {
width: 12, width: 16,
height: 12, height: 16,
right: -6, right: -8,
top: -6, top: -8,
borderRadius: 999, borderRadius: 999,
border: `2px solid ${SELECTION_COLOR}`, border: `3px solid ${SELECTION_COLOR}`,
backgroundColor: "#ffffff", backgroundColor: "#ffffff",
}, },
bottomRight: { bottomRight: {
width: 12, width: 16,
height: 12, height: 16,
right: -6, right: -8,
bottom: -6, bottom: -8,
borderRadius: 999, borderRadius: 999,
border: `2px solid ${SELECTION_COLOR}`, border: `3px solid ${SELECTION_COLOR}`,
backgroundColor: "#ffffff", backgroundColor: "#ffffff",
}, },
bottomLeft: { bottomLeft: {
width: 12, width: 16,
height: 12, height: 16,
left: -6, left: -8,
bottom: -6, bottom: -8,
borderRadius: 999, borderRadius: 999,
border: `2px solid ${SELECTION_COLOR}`, border: `3px solid ${SELECTION_COLOR}`,
backgroundColor: "#ffffff", backgroundColor: "#ffffff",
}, },
topLeft: { topLeft: {
width: 12, width: 16,
height: 12, height: 16,
left: -6, left: -8,
top: -6, top: -8,
borderRadius: 999, borderRadius: 999,
border: `2px solid ${SELECTION_COLOR}`, border: `3px solid ${SELECTION_COLOR}`,
backgroundColor: "#ffffff", backgroundColor: "#ffffff",
}, },
} }

View File

@ -1477,7 +1477,7 @@ export function ImageNode({ node, isSelected }: ImageNodeProps) {
className={cn( className={cn(
"relative w-full h-full bg-card rounded-[4px] overflow-hidden border shadow-sm transition-colors", "relative w-full h-full bg-card rounded-[4px] overflow-hidden border shadow-sm transition-colors",
isSelected isSelected
? "border-[#3182ed] shadow-none" ? "rounded-none border-[1.5px] border-[#27a8ff] shadow-none"
: "border-transparent" : "border-transparent"
)} )}
onMouseEnter={() => setIsHovered(true)} onMouseEnter={() => setIsHovered(true)}