From 30e2f562bcf20e742f19b2480b4c7ad33fc76b5f Mon Sep 17 00:00:00 2001 From: fukunee Date: Sat, 19 Sep 2026 17:38:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BE=BF=E7=AD=BE=EF=BC=9A=E7=AE=AD=E5=A4=B4?= =?UTF-8?q?=E6=9B=B2=E7=BA=BF=E7=9B=B4=E6=8E=A5=E5=B9=B3=E6=BB=91=E8=BF=87?= =?UTF-8?q?=E6=B8=A1=E5=88=B0=E9=95=BF=E8=BE=B9=EF=BC=8C=E6=B6=88=E9=99=A4?= =?UTF-8?q?=E5=B0=8F=E6=8B=90=E8=A7=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/scene/CesiumGlobe.js | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/src/scene/CesiumGlobe.js b/src/scene/CesiumGlobe.js index 15ff13c..56b4317 100644 --- a/src/scene/CesiumGlobe.js +++ b/src/scene/CesiumGlobe.js @@ -77,23 +77,15 @@ 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 + h / 2 - arrowH / 2, - ox + arrowW, oy + radius, - ); - ctx.arcTo(ox + arrowW, oy, ox + arrowW + radius, oy, radius); + // 上侧:一条曲线从尖端平滑过渡到上边缘(终点水平切线,无折角) + ctx.quadraticCurveTo(ox + arrowW * 0.7, oy, ox + arrowW, oy); 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 + radius, oy + h); - ctx.arcTo(ox + arrowW, oy + h, ox + arrowW, oy + h - radius, radius); - // 下侧:平滑曲线从下边缘连回尖端 - ctx.quadraticCurveTo( - ox + arrowW * 0.7, oy + h / 2 + arrowH / 2, - ox, oy + h / 2, - ); + ctx.lineTo(ox + arrowW, oy + h); + // 下侧:一条曲线从下边缘平滑过渡回尖端(起点水平切线) + ctx.quadraticCurveTo(ox + arrowW * 0.7, oy + h, ox, oy + h / 2); ctx.closePath(); if (selected) {