Skip to content

Commit 7d792c5

Browse files
committed
cursor light dark
1 parent 4672ed2 commit 7d792c5

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

src/plotArray.tsx

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,23 @@ function PlotArray({
122122
}
123123
}, [resultArray]);
124124

125+
useEffect(() => {
126+
if (canvasMain.current) {
127+
crossXLine.color =
128+
theme === "dark"
129+
? new ColorRGBA(0.1, 1, 0.1, 1)
130+
: new ColorRGBA(0.05, 0.4, 0.05, 1);
131+
crossYLine.color =
132+
theme === "dark"
133+
? new ColorRGBA(0.1, 1, 0.1, 1)
134+
: new ColorRGBA(0.1, 0.5, 0.1, 1);
135+
zoomRect.color =
136+
theme === "dark"
137+
? new ColorRGBA(0.8, 0.8, 0.2, 0.25)
138+
: new ColorRGBA(0.1, 0.1, 0.4, 0.25);
139+
}
140+
}, [theme]);
141+
125142
useEffect(() => {
126143
if (canvasMain.current) {
127144
const devicePixelRatio = window.devicePixelRatio || 1;

0 commit comments

Comments
 (0)