feat: add complex junction selection markers
This commit is contained in:
1 parent
57248f1aa4
commit
38ea779d9b
18 files changed
+685
-48
No files matched your search
@@ -690,7 +690,7 @@ function selectJunctionCandidate(feature) {
|
||||
form.hidden = true;
|
||||
hint.hidden = false;
|
||||
selectedJunctionPanel.hidden = true;
|
||||
hint.textContent = `复杂路口候选 #${candidate.index}:${candidate.nodeCount} 个节点,直径 ${candidate.diameterMeters} 米。下方是可直接粘贴到 config 的片段。`;
|
||||
hint.textContent = `当前路口附近检测到 ${candidate.nodeCount} 个相邻节点,范围约 ${candidate.diameterMeters} 米。下方是可直接粘贴到 config 的片段。`;
|
||||
evidence.textContent = JSON.stringify(
|
||||
{
|
||||
说明: '复制到区域配置文件的 nativeRoad.junctionTemplates.clusters 数组,然后重新编译',
|
||||
@@ -714,7 +714,7 @@ function selectJunctionCandidate(feature) {
|
||||
2,
|
||||
);
|
||||
renderCandidateAction(candidate);
|
||||
message(`已选中复杂路口候选 #${candidate.index}`);
|
||||
message('已选中当前路口附近的复杂路口候选');
|
||||
}
|
||||
// The accept button lives beside the snippet so the manual path stays available
|
||||
// if the write is refused; both describe the same cluster.
|
||||
@@ -722,15 +722,15 @@ function renderCandidateAction(candidate) {
|
||||
candidateAction.replaceChildren();
|
||||
const button = document.createElement('button');
|
||||
button.type = 'button';
|
||||
button.textContent = `把候选 #${candidate.index} 加入配置并重新编译`;
|
||||
button.textContent = '把当前候选路口加入配置并重新编译';
|
||||
button.onclick = async () => {
|
||||
button.disabled = true;
|
||||
message(`正在把候选 #${candidate.index} 写入区域配置...`);
|
||||
message('正在把当前候选路口写入区域配置...');
|
||||
try {
|
||||
const response = await fetch('/api/junction-clusters', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ index: candidate.index }),
|
||||
body: JSON.stringify({ candidateId: candidate.id }),
|
||||
cache: 'no-store',
|
||||
});
|
||||
const result = await response.json();
|
||||
|
||||
Reference in new issue
Block a user