Merge remote-tracking branches 'origin/main_laptop_1' and 'origin/sub_laptop_4' into sub_laptop_7
This commit is contained in:
@@ -190,7 +190,7 @@ export async function mountCrossView(
|
||||
focusChainage: (chainageM) => {
|
||||
if (!isWallSelecting()) focusStationAt(chainageM);
|
||||
},
|
||||
releaseCard: () => sectionView.focusStation(null),
|
||||
releaseCard: () => releaseCross(),
|
||||
markStructure: (structureId) => sectionView.selectMark(structureId),
|
||||
applyPipeOptions: (chainageM, patch) =>
|
||||
applyPipeOptionsToCache(pipeOptionsContext, chainageM, patch),
|
||||
@@ -491,6 +491,27 @@ export async function mountCrossView(
|
||||
if (applied) appliedPick = signature;
|
||||
}
|
||||
|
||||
/** 고름을 다 풂(54-38) — 카드 · 벽 · 세월교 · BOX 강조 · 넘김 되얹기 표시 · 선택 칸. */
|
||||
function releaseCross(): void {
|
||||
const { revetOffset, ford, box } = stationControls;
|
||||
const lit = (sectionDetail?.cross_sections ?? []).filter(
|
||||
(s) =>
|
||||
revetOffset.highlightFor(s) ||
|
||||
ford.selectedFor(s.chainage_m) ||
|
||||
box.selectedFor(s.chainage_m),
|
||||
);
|
||||
for (const s of lit) {
|
||||
if (revetOffset.selectedFor(s)) revetOffset.select(s.chainage_m, null);
|
||||
if (ford.selectedFor(s.chainage_m)) ford.select(s.chainage_m, null);
|
||||
if (box.selectedFor(s.chainage_m)) box.select(s.chainage_m, null);
|
||||
}
|
||||
structuresPanel.releasePipe();
|
||||
sectionView.focusStation(null);
|
||||
sectionView.refreshCards(lit.map((s) => s.chainage_m));
|
||||
appliedPick = null;
|
||||
selectDesign(projectId, NO_SELECTION, { from: "b06" });
|
||||
}
|
||||
|
||||
function renderSectionDetail(): void {
|
||||
if (!sectionDetail) return;
|
||||
showSectionView();
|
||||
@@ -541,6 +562,8 @@ export async function mountCrossView(
|
||||
if (currentRouteId === null) return;
|
||||
// 떠난 사이 종단 보기가 폼을 다른 것으로 바꿨을 수 있음 — 같은 넘김값도 다시 적용(53-1)
|
||||
appliedPick = null;
|
||||
// 종단 보기에서 고름을 풀었으면 횡단 강조도 풂(54-38)
|
||||
if (!readStructurePick(projectId)) releaseCross();
|
||||
void structuresPanel.load().then(restoreStructurePick);
|
||||
void refreshDetailForStructures().then(() => reconcileStaleDesigns());
|
||||
});
|
||||
|
||||
@@ -12,7 +12,7 @@ import type { StructureInstance, StructureType } from "./B05_Profile_Api_Structu
|
||||
import type { StructuresCommitContext } from "./B05_Profile_UI_Structures_Panel_Commit";
|
||||
import { asRoad } from "./B05_Profile_UI_Structures_Define";
|
||||
import { readState, writeState } from "../A00_Common/b_page_state";
|
||||
import { PIPE_MATCH_M } from "../A00_Common/design/design_selection";
|
||||
import { NO_SELECTION, PIPE_MATCH_M, selectDesign } from "../A00_Common/design/design_selection";
|
||||
import { readGroupItems, readSummaryItem } from "../common_util/common_util_summary_item";
|
||||
|
||||
/** 배선에 필요한 패널 내부 값 — 이름은 분리 전 지역변수와 같다. */
|
||||
@@ -40,6 +40,9 @@ export function bindStructuresEvents(ctx: StructuresEventContext): void {
|
||||
/** 새로 놓기(54-32) — 고름 · 측점 · 강조를 풀고 군(· 종류)만 남긴 빈 기본값 폼. */
|
||||
function startNew(group: string, typeId?: string): void {
|
||||
ctx.resetForm();
|
||||
// 횡단 카드 · 부재 강조와 넘김 선택도 풂 — B05 → B06 넘김에서 되얹지 않게(54-38)
|
||||
ctx.callbacks.onListRelease?.();
|
||||
selectDesign(ctx.projectId, NO_SELECTION, { from: "b05" });
|
||||
ctx.groupSelect.value = group;
|
||||
ctx.syncTypeOptions(typeId);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
/* 54-38 고른 구조물에서 군 바꿈 = 횡단 강조(카드 · 벽 · 부재 · 조정 칸)도 풂
|
||||
* 시작 화면: B06 횡단설계(#/b06-section) · 검증 프로젝트(sub4) · 로그인
|
||||
* 부르는 법: 단계마다 `window.__m5438 = "단계";` 뒤 이 파일 본문을 eval
|
||||
* a (B06) 배관 1 → 유입 벽 고름 → 군 바꿈 = 강조 0 · 돌쌓기(찰) 1 → 군 바꿈 = 강조 0
|
||||
* b (B06) 배관 1 → 벽 고름 → B05 로 → 군 바꿈 → B06 로 = 강조 0 · 선택 칸 비어 있음
|
||||
* 결과는 sessionStorage `__5438_out_{단계}` · 기대: fails 0
|
||||
*/
|
||||
(async () => {
|
||||
const MODE = window.__m5438 || "a";
|
||||
const w = (ms) => new Promise((r) => setTimeout(r, ms));
|
||||
const pid = localStorage.getItem("frd_current_project_id");
|
||||
const t = (e) => e.innerText.replace(/\s+/g, " ").trim();
|
||||
const fails = [];
|
||||
const out = {};
|
||||
const fail = (m) => fails.push(m);
|
||||
const sec = () => document.querySelector(".b05-structure-section");
|
||||
const grid = () => sec().querySelectorAll(".b05-structure__grid select");
|
||||
const rows = () => [...document.querySelectorAll(".b05-route__irregular-list li")];
|
||||
const row = (head) => rows().find((li) => t(li).startsWith(head));
|
||||
const fire = (el, value) => {
|
||||
el.value = value;
|
||||
el.dispatchEvent(new Event("input", { bubbles: true }));
|
||||
el.dispatchEvent(new Event("change", { bubbles: true }));
|
||||
};
|
||||
const pick = async (head) => {
|
||||
for (let k = 0; k < 40 && !row(head); k++) await w(300);
|
||||
if (!row(head)?.classList.contains("is-selected")) row(head)?.click();
|
||||
await w(2000);
|
||||
};
|
||||
const setGroup = async (g) => (fire(grid()[0], g), await w(2000));
|
||||
/** 횡단 강조 수 — 고른 카드 · 그림 부재 · 조정 칸 */
|
||||
const lit = () => ({
|
||||
card: document.querySelectorAll(".b06-cross-card--selected").length,
|
||||
part: document.querySelectorAll(".b06-cross-card svg .is-active").length,
|
||||
box: document.querySelectorAll("fieldset[data-spec-container].is-active").length,
|
||||
});
|
||||
const total = (o) => o.card + o.part + o.box;
|
||||
/** 고른 카드의 유입 벽을 누름 — 횡단에서 벽을 고른 길 */
|
||||
const pickWall = async () => {
|
||||
const shape = document.querySelector(".b06-cross-card--selected .b06-chart__culvert-revet-hit");
|
||||
shape?.dispatchEvent(new MouseEvent("click", { bubbles: true }));
|
||||
await w(1500);
|
||||
return !!shape;
|
||||
};
|
||||
const go = async (hash) => ((location.hash = hash), await w(5000));
|
||||
const pickState = () => sessionStorage.getItem(`aislo:draft:structure-pick:${pid}`);
|
||||
|
||||
if (MODE === "a") {
|
||||
await pick("4+5 배관 1");
|
||||
out.wallClicked = await pickWall();
|
||||
out.pipeBefore = lit();
|
||||
if (total(out.pipeBefore) === 0) fail("배관 고름 강조 없음");
|
||||
await setGroup("C");
|
||||
out.pipeAfter = lit();
|
||||
if (total(out.pipeAfter) !== 0) fail(`배관 군 바꿈 강조 ${JSON.stringify(out.pipeAfter)}`);
|
||||
await pick("4+0~4+10 돌쌓기(찰) 1");
|
||||
out.structBefore = lit();
|
||||
if (total(out.structBefore) === 0) fail("돌쌓기 고름 강조 없음");
|
||||
await setGroup("B");
|
||||
out.structAfter = lit();
|
||||
if (total(out.structAfter) !== 0)
|
||||
fail(`돌쌓기 군 바꿈 강조 ${JSON.stringify(out.structAfter)}`);
|
||||
out.pick = pickState();
|
||||
}
|
||||
|
||||
if (MODE === "b") {
|
||||
await pick("4+5 배관 1");
|
||||
out.wallClicked = await pickWall();
|
||||
out.before = lit();
|
||||
await go("#/b05-profile");
|
||||
await pick("4+5 배관 1");
|
||||
await setGroup("C");
|
||||
out.pick = pickState();
|
||||
await go("#/b06-section");
|
||||
out.after = lit();
|
||||
if (total(out.after) !== 0) fail(`B05 군 바꿈 뒤 B06 강조 ${JSON.stringify(out.after)}`);
|
||||
}
|
||||
|
||||
sessionStorage.setItem(`__5438_out_${MODE}`, JSON.stringify({ fails, out }));
|
||||
})();
|
||||
Reference in New Issue
Block a user