" +
+ ' ' +
Math.round((smPresentTypes[k] * 100) / total) +
"%"
);
@@ -7344,34 +7377,34 @@ function starmapShowDetail(mesh) {
var rows = [];
rows.push(
- '' +
- escHtml(String(nd.name || id)) +
- "
",
+ '' + escHtml(String(nd.name || id)) + "
",
);
rows.push(
'' +
- escHtml(String(nd.type || "block")) +
- " · " +
- escHtml(String(nd.source || "-")) +
- (nd.scene ? " · " + escHtml(String(nd.scene)) : "") +
- "
",
+ escHtml(String(nd.type || "block")) +
+ " · " +
+ escHtml(String(nd.source || "-")) +
+ (nd.scene ? " · " + escHtml(String(nd.scene)) : "") +
+ "",
);
if (nb.length) {
rows.push('');
for (var j = 0; j < nb.length; j++) {
rows.push(
'
' +
- nb[j].dir +
- "" +
- escHtml(String(nb[j].rel || "关联")) +
- ' ' +
- escHtml(String(nb[j].name || "").slice(0, 20)) +
- "
",
+ nb[j].dir +
+ "" +
+ escHtml(String(nb[j].rel || "关联")) +
+ '
' +
+ escHtml(String(nb[j].name || "").slice(0, 20)) +
+ " ",
);
}
rows.push("");
} else {
- rows.push('' + __("无关联", "no relations") + "
");
+ rows.push(
+ '' + __("无关联", "no relations") + "
",
+ );
}
rows.push(
'' + escHtml(String(id).slice(0, 28)) + "
",
@@ -7498,7 +7531,9 @@ function starmapMakeLabelPlan() {
var nm = mesh.userData._labelText;
if (nm === undefined) {
var nd = mesh.userData.nodeData || {};
- nm = String(nd.name || nd.id || "").replace(/\s+/g, " ").trim();
+ nm = String(nd.name || nd.id || "")
+ .replace(/\s+/g, " ")
+ .trim();
// 名字过长时截断:星图是“索引”,长句应该点开看而不是在图上读完。
if (nm.length > 18) nm = nm.slice(0, 17) + "…";
mesh.userData._labelText = nm;
@@ -7558,7 +7593,12 @@ var starmapMeshByWeight = null,
function starmapDrawLabels() {
if (!starmapRen || !starmapCam || !starmapNodeMeshes.length) {
if (starmapLabelCtx && starmapLabelCanvas) {
- starmapLabelCtx.clearRect(0, 0, starmapLabelCanvas.width, starmapLabelCanvas.height);
+ starmapLabelCtx.clearRect(
+ 0,
+ 0,
+ starmapLabelCanvas.width,
+ starmapLabelCanvas.height,
+ );
}
return;
}
@@ -7591,11 +7631,15 @@ function starmapDrawLabels() {
cw +
"x" +
ch;
- // ★ 节流:相机拖动(OrbitControls 阻尼)会让 camKey 每帧都变,
+ // ★ 节流:相机拖动(OrbitControls 阻尼)会让 camKey 每帧都变,
// 若每帧重建 plan(3190 项)+ measureText,拖动时就是持续掉帧。
// 标签是文字层,10fps 的刷新肉眼已看不出滞后(图形仍是 60fps)。
var nowMs = Date.now();
- if (nowMs - starmapLabelLastDraw < SM_LABEL_MIN_INTERVAL || camKey === starmapLabelLastCamKey) return;
+ if (
+ nowMs - starmapLabelLastDraw < SM_LABEL_MIN_INTERVAL ||
+ camKey === starmapLabelLastCamKey
+ )
+ return;
starmapLabelLastCamKey = camKey;
starmapLabelLastDraw = nowMs;
@@ -7832,7 +7876,8 @@ function toggleSecretVisibility(inpId) {
var btn = el.parentElement ? el.parentElement.querySelector("button") : null;
if (btn) btn.textContent = showing ? __("显示", "Show") : __("隐藏", "Hide");
}
-if (typeof window !== "undefined") window.toggleSecretVisibility = toggleSecretVisibility;
+if (typeof window !== "undefined")
+ window.toggleSecretVisibility = toggleSecretVisibility;
function renderSettingsSidebar() {
var el = document.querySelector(".settings-tabs");
@@ -8071,7 +8116,7 @@ function renderOneSettings() {
escHtml(ph) +
'" onchange="markDirty(\'' +
k +
- "')\" style=\"flex:1\" autocomplete=\"new-password\">" +
+ '\')" style="flex:1" autocomplete="new-password">' +
'