From 929e55c32f0da1d381518827b79070b9064cd4a4 Mon Sep 17 00:00:00 2001 From: fukunee Date: Sat, 19 Sep 2026 17:40:17 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AE=AD=E5=A4=B4=E6=94=B9=E5=9B=9E=E7=9B=B4?= =?UTF-8?q?=E8=A7=92=E4=B8=89=E8=A7=92=EF=BC=88=E6=97=A0=E5=9C=86=E8=A7=92?= =?UTF-8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/scene/CesiumGlobe.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/scene/CesiumGlobe.js b/src/scene/CesiumGlobe.js index 7b95079..2e0cc86 100644 --- a/src/scene/CesiumGlobe.js +++ b/src/scene/CesiumGlobe.js @@ -77,15 +77,16 @@ function makeStickyNote(text, fontSize, selected = false) { // 箭头 + 圆角矩形一体化路径(箭头尖端在 (ox, oy + h/2),指向坐标) ctx.beginPath(); ctx.moveTo(ox, oy + h / 2); - // 上侧:一条曲线从尖端平滑过渡到上边缘(终点水平切线,无折角) - ctx.quadraticCurveTo(ox + arrowW * 0.7, oy, ox + arrowW, oy); + ctx.lineTo(ox + arrowW, oy + h / 2 - arrowH / 2); + ctx.lineTo(ox + arrowW, oy + radius); + ctx.arcTo(ox + arrowW, oy, ox + arrowW + radius, oy, radius); ctx.lineTo(ox + w - radius, oy); ctx.arcTo(ox + w, oy, ox + w, oy + radius, radius); ctx.lineTo(ox + w, oy + h - radius); ctx.arcTo(ox + w, oy + h, ox + w - radius, oy + h, radius); - ctx.lineTo(ox + arrowW, oy + h); - // 下侧:一条曲线从下边缘平滑过渡回尖端(起点水平切线) - ctx.quadraticCurveTo(ox + arrowW * 0.7, oy + h, ox, oy + h / 2); + ctx.lineTo(ox + arrowW + radius, oy + h); + ctx.arcTo(ox + arrowW, oy + h, ox + arrowW, oy + h - radius, radius); + ctx.lineTo(ox + arrowW, oy + h / 2 + arrowH / 2); ctx.closePath(); if (selected) {