标记便签改用纸张黄、黑字加粗
This commit is contained in:
@@ -41,7 +41,7 @@ function makeRoundedBg(text, fontSize) {
|
|||||||
const padX = 12, padY = 7, radius = 10;
|
const padX = 12, padY = 7, radius = 10;
|
||||||
const m = document.createElement('canvas');
|
const m = document.createElement('canvas');
|
||||||
const mctx = m.getContext('2d');
|
const mctx = m.getContext('2d');
|
||||||
mctx.font = `${fontSize}px "Noto Serif SC", "Songti SC", "STSong", "SimSun", Georgia, serif`;
|
mctx.font = `bold ${fontSize}px "Noto Serif SC", "Songti SC", "STSong", "SimSun", Georgia, serif`;
|
||||||
const textW = mctx.measureText(text).width;
|
const textW = mctx.measureText(text).width;
|
||||||
const w = Math.max(1, Math.ceil(textW + padX * 2));
|
const w = Math.max(1, Math.ceil(textW + padX * 2));
|
||||||
const h = Math.ceil(fontSize + padY * 2);
|
const h = Math.ceil(fontSize + padY * 2);
|
||||||
@@ -56,10 +56,10 @@ function makeRoundedBg(text, fontSize) {
|
|||||||
ctx.arcTo(0, h, 0, 0, radius);
|
ctx.arcTo(0, h, 0, 0, radius);
|
||||||
ctx.arcTo(0, 0, w, 0, radius);
|
ctx.arcTo(0, 0, w, 0, radius);
|
||||||
ctx.closePath();
|
ctx.closePath();
|
||||||
ctx.shadowColor = 'rgba(0, 0, 0, 0.22)';
|
ctx.shadowColor = 'rgba(0, 0, 0, 0.18)';
|
||||||
ctx.shadowBlur = 6;
|
ctx.shadowBlur = 4;
|
||||||
ctx.shadowOffsetY = 2;
|
ctx.shadowOffsetY = 1;
|
||||||
ctx.fillStyle = '#FFEB3B';
|
ctx.fillStyle = '#FFF9A6';
|
||||||
ctx.fill();
|
ctx.fill();
|
||||||
return { canvas: c, textW };
|
return { canvas: c, textW };
|
||||||
}
|
}
|
||||||
@@ -189,7 +189,7 @@ export class CesiumGlobe {
|
|||||||
},
|
},
|
||||||
label: {
|
label: {
|
||||||
text: entry.name,
|
text: entry.name,
|
||||||
font: '19px "Noto Serif SC", "Songti SC", "STSong", "SimSun", Georgia, serif',
|
font: 'bold 19px "Noto Serif SC", "Songti SC", "STSong", "SimSun", Georgia, serif',
|
||||||
fillColor: ink,
|
fillColor: ink,
|
||||||
style: Cesium.LabelStyle.FILL,
|
style: Cesium.LabelStyle.FILL,
|
||||||
horizontalOrigin: Cesium.HorizontalOrigin.LEFT,
|
horizontalOrigin: Cesium.HorizontalOrigin.LEFT,
|
||||||
|
|||||||
Reference in New Issue
Block a user