feat: 유통데이터의 지도에서 '지도구분' 클릭 시 CALS 분류 쳬계만 모두 expand되도록 수정

main
thkim 2025-12-09 11:55:04 +09:00
parent 9bde6258f7
commit fb1e0b34fb
2 changed files with 32 additions and 1 deletions

View File

@ -1372,7 +1372,7 @@ function table3display(){
}
</script>
<div class="map-division-wrapper">
<div class="map-division-title" id="map-label-cals" onclick="forceUncheckHoleLayerOnOff();" style="cursor: pointer;">
<div class="map-division-title" id="map-label-cals" onclick="forceUncheckHoleLayerOnOff();" style="cursor: pointer;" title="전체 지도 구분(CALS) 숨김/보임">
지도구분
</div>
<div class="map-division-contents">
@ -1649,6 +1649,9 @@ function table3display(){
</li>
</ul>
</li>
<li>
<hr style="margin: 2px 0px;background-color: #777777; border: none; border-top: 1px dashed #ccc;"></hr>
</li>
<li class="closed">
<span>지반정보</span>
<ul>

View File

@ -417,6 +417,34 @@ function forceUncheckHoleLayerOnOff() {
//hideLeftSideBar();
$(window).trigger('resize');
BASE_MAP.updateSize();
// 열고자 하는 메뉴의 텍스트 목록 정의
var targetsToOpen = [
"계획구역 및 토지정비",
"공공건축시설",
"주거 및 상업시설",
"보건,휴식,종교시설",
"수자원 및 환경처리시설",
"자원공급시설",
"지반조사"
];
// 트리 메뉴의 최상위 li 요소들을 순회하며 타겟 메뉴를 찾음
$("#browser > li").each(function() {
var $this = $(this);
var text = $.trim($this.children("span").text()); // 메뉴명 텍스트 추출
// 목록에 있고 현재 닫혀있는(closed) 상태라면
if (targetsToOpen.indexOf(text) > -1 && $this.hasClass("closed")) {
// 트리뷰 플러그인이 생성한 확장 버튼(hitarea)을 강제로 클릭하여 펼침
$this.find(">.hitarea").trigger("click");
$this.removeClass("closed");
$this.addClass("open");
// 만약 '지반조사' 처럼 style="display: none;"으로 숨겨진 항목을 화면에 보이게 하려면 아래 주석 해제
// $this.show();
}
});
}