Skip to content

Commit f68cf65

Browse files
committed
fix: 瞄准镜透明度100%
1 parent b9183b5 commit f68cf65

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

app/src/core/render/canvas2d/renderer.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ export class Renderer {
107107
// 绘制圆形区域
108108
ctx.beginPath();
109109
ctx.arc(mouseX, mouseY, scopeRadius, 0, Math.PI * 2);
110+
ctx.fillStyle = "rgba(0, 0, 0, 1)"; // 设置填充颜色为完全不透明的黑色
110111
ctx.fill();
111112
// 恢复合成模式
112113
ctx.globalCompositeOperation = "source-over";
@@ -613,7 +614,7 @@ export class Renderer {
613614
`Stage.warningAssociations: ${this.project.controller.cutting.warningAssociations.length}`,
614615
`ConnectFromNodes: ${this.project.controller.nodeConnection.connectFromEntities}`,
615616
`lastSelectedNode: ${this.project.controller.lastSelectedEntityUUID.size}`,
616-
`粘贴板: ${JSON.stringify(this.project.copyEngine?.copyBoardData || "undefined")}`,
617+
`粘贴板: ${this.project.copyEngine ? "存在" : "undefined"}`,
617618
`fps: ${this.fps}`,
618619
`delta: ${this.deltaTime.toFixed(2)}`,
619620
`uri: ${this.project.uri}`,

app/src/core/service/controlService/MouseLocation.tsx

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,9 @@ export const MouseLocation = {
44
x: 0,
55
y: 0,
66
init() {
7-
// window.addEventListener("pointerdown", (e) => {
8-
// if (e.button === 2) {
9-
// e.preventDefault();
10-
// }
11-
// });
12-
137
window.addEventListener("pointermove", (event) => {
14-
this.x = event.clientX;
15-
this.y = event.clientY;
16-
8+
MouseLocation.x = event.clientX;
9+
MouseLocation.y = event.clientY;
1710
// this.project.controller.recordManipulate();
1811
// 检测是否超出范围
1912
// TODO: 优化,给每个 Controller 加一个 pointerMoveOutWindowForcedShutdown 方法

0 commit comments

Comments
 (0)