MCPcopy
hub / github.com/graphif/project-graph / handleRemoveBackground

Function handleRemoveBackground

app/src/sub/BackgroundManagerWindow.tsx:51–60  ·  view source on GitHub ↗
(imageNode: ImageNode)

Source from the content-addressed store, hash-verified

49 }, [project, backgroundImages]);
50
51 const handleRemoveBackground = (imageNode: ImageNode) => {
52 if (project) {
53 imageNode.isBackground = false;
54 project.historyManager.recordStep();
55 toast.success("已取消图片的背景化");
56 // 刷新背景图片列表
57 const images = project.stageManager.getImageNodes().filter((imageNode) => imageNode.isBackground);
58 setBackgroundImages(images);
59 }
60 };
61
62 return (
63 <div className="flex flex-col gap-4 p-4">

Callers 1

BackgroundManagerWindowFunction · 0.85

Calls 2

getImageNodesMethod · 0.80
recordStepMethod · 0.45

Tested by

no test coverage detected