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) {