From 46a6dda7534f4250d48c0c6fed3e3ec582335975 Mon Sep 17 00:00:00 2001 From: Cheng Zhou Date: Mon, 20 Jul 2026 11:10:08 +0800 Subject: [PATCH] =?UTF-8?q?fix(monitoring):=20=E4=BF=AE=E5=A4=8D=E9=A3=9E?= =?UTF-8?q?=E7=BA=BF=E5=9B=BE=E7=99=BD=E8=89=B2=E6=B8=B2=E6=9F=93=E6=AE=8B?= =?UTF-8?q?=E5=BD=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/PermissionIpLocations.test.ts | 5 +++-- frontend/src/components/PermissionIpLocations.vue | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/frontend/src/components/PermissionIpLocations.test.ts b/frontend/src/components/PermissionIpLocations.test.ts index 1baafc2f..ed1ba034 100644 --- a/frontend/src/components/PermissionIpLocations.test.ts +++ b/frontend/src/components/PermissionIpLocations.test.ts @@ -47,11 +47,12 @@ describe("PermissionIpLocations", () => { expect(source).not.toContain('all: "近 90 天"'); }); - it("keeps fullscreen animation sharp without multiplying large canvas layers", () => { + it("keeps fullscreen animation sharp without dirty-rect artifacts or extra canvas layers", () => { const source = readSource(); expect(source).toContain('v-if="!fullscreenVisible"'); - expect(source).toContain("useDirtyRect: true"); + expect(source).toContain("useDirtyRect: false"); + expect(source).not.toContain("useDirtyRect: true"); expect(source).toContain("Math.min(getDevicePixelRatio(), 2)"); expect(source).not.toContain("getDevicePixelRatio() * 1.5"); expect(source).not.toContain("zlevel:"); diff --git a/frontend/src/components/PermissionIpLocations.vue b/frontend/src/components/PermissionIpLocations.vue index 959d1793..2be0fe97 100644 --- a/frontend/src/components/PermissionIpLocations.vue +++ b/frontend/src/components/PermissionIpLocations.vue @@ -223,8 +223,9 @@ const mapLoadError = ref(""); const mapReady = ref(false); const lastUpdatedAt = ref(null); const getDevicePixelRatio = () => (typeof window === "undefined" ? 1 : window.devicePixelRatio || 1); -const chartInitOptions = { devicePixelRatio: Math.min(getDevicePixelRatio(), 2), useDirtyRect: true }; -const fullscreenChartInitOptions = { devicePixelRatio: Math.min(getDevicePixelRatio(), 2), useDirtyRect: true }; +// Animated lines/effectScatter leave cleared rectangles over the geo layer when dirty-rect rendering is enabled. +const chartInitOptions = { devicePixelRatio: Math.min(getDevicePixelRatio(), 2), useDirtyRect: false }; +const fullscreenChartInitOptions = { devicePixelRatio: Math.min(getDevicePixelRatio(), 2), useDirtyRect: false }; const chartUpdateOptions = { notMerge: true }; const chartAutoresize = { throttle: 120 }; const fullscreenVisible = ref(false);