词条便签整体缩小,圆角更小

This commit is contained in:
2026-09-19 17:41:14 +08:00
parent 4cfeb7cba0
commit 6d46d51685
+3 -3
View File
@@ -55,7 +55,7 @@ function sphericalAreaKm2(polys) {
// 生成便签 canvas:黄底圆角 + 左侧箭头 + 黑色加粗文字(整张图,箭头尖端指向坐标)
// 选中态:先描粗边再填充,得到一条干净的 2px 外描边(四周预留 B 的 padding 防止裁切)
function makeStickyNote(text, fontSize, selected = false) {
const padX = 8, padY = 5, radius = 4, arrowW = 13, arrowH = 16, S = 2, B = 2; // S: 2x 超采样,B: 边框预留
const padX = 7, padY = 4, radius = 2, arrowW = 11, arrowH = 14, S = 2, B = 2; // S: 2x 超采样,B: 边框预留
const font = `bold ${fontSize}px "Noto Serif SC", "Songti SC", "STSong", "SimSun", Georgia, serif`;
const m = document.createElement('canvas');
const mctx = m.getContext('2d');
@@ -324,8 +324,8 @@ export class CesiumGlobe {
_buildMarkers() {
ENTRIES.forEach((entry, i) => {
const position = Cesium.Cartesian3.fromDegrees(entry.lng, entry.lat);
const noteNormal = makeStickyNote(entry.name, 16, false);
const noteSelected = makeStickyNote(entry.name, 16, true);
const noteNormal = makeStickyNote(entry.name, 14, false);
const noteSelected = makeStickyNote(entry.name, 14, true);
this.markers.push({
lng: entry.lng,
lat: entry.lat,