diff --git a/apps/sn/app/(map-layout)/map/page.tsx b/apps/sn/app/(map-layout)/map/page.tsx index dfb64a1ee..30e7f8a4e 100644 --- a/apps/sn/app/(map-layout)/map/page.tsx +++ b/apps/sn/app/(map-layout)/map/page.tsx @@ -6650,6 +6650,7 @@ const Map = () => { waterDepth={undefined} layerSettingView={ActiveLayerSettingView} treeSectionClassName="rounded-sm border border-slate-300 px-1 py-2" + detachedTreeToggleButton={true} isPlaying={isPlaying} setIsPlaying={setIsPlaying as any} targetLayerTypes={WATER_DEPTH_LAYER_TYPES as any} diff --git a/packages/common/business_components/src/ui/map/Gis.js b/packages/common/business_components/src/ui/map/Gis.js index adc1f1be9..2eea996df 100644 --- a/packages/common/business_components/src/ui/map/Gis.js +++ b/packages/common/business_components/src/ui/map/Gis.js @@ -75,6 +75,7 @@ function Gis({ zoomGuide, showFloatingSearchButton = true, treeTogglePosition = "center", + detachedTreeToggleButton = false, showZoomScaleInfo = false, }) { const mapRef = useRef(); @@ -319,6 +320,7 @@ function Gis({ inlineLayerSettingView={inlineLayerSettingView} treeSectionClassName={treeSectionClassName} toggleButtonPosition={treeTogglePosition} + detachedToggleButton={detachedTreeToggleButton} /> {typeof WaterDepth === "function" && ( diff --git a/packages/common/business_components/src/ui/map/GisTree.js b/packages/common/business_components/src/ui/map/GisTree.js index 7056bd622..1e6d66edc 100644 --- a/packages/common/business_components/src/ui/map/GisTree.js +++ b/packages/common/business_components/src/ui/map/GisTree.js @@ -29,6 +29,7 @@ import GisApp from "./lib/gis.core"; * - onProgressChange(total, current): 애니메이션 진행상태 콜백 * - layerSettingView: (선택) 좌측 레이어 트리 하단에 표시할 설정 영역 * - layerIconVisible: (선택) 레이어 행 우측 액션 아이콘 노출 여부를 결정하는 함수 + * - detachedToggleButton: (선택) 접기/펼치기 버튼을 패널 밖 고정 핸들로 노출할지 여부 */ export default React.memo(function GisTree({ checkedNodes = [], @@ -48,6 +49,8 @@ export default React.memo(function GisTree({ inlineLayerSettingView, treeSectionClassName = "", toggleButtonPosition = "center", + showLayerPanelTitle = true, + detachedToggleButton = false, }) { const { gisCore, treeData } = useGisContext(); @@ -517,6 +520,7 @@ export default React.memo(function GisTree({ toggleButtonPosition === "top" ? "top-4" : "top-1/2 -translate-y-1/2"; const thinScrollbarClass = "[scrollbar-width:thin] [&::-webkit-scrollbar]:w-[4px]"; + const treeSectionClassNames = [treeSectionClassName, thinScrollbarClass].filter(Boolean).join(" "); return ( <> @@ -528,13 +532,18 @@ export default React.memo(function GisTree({ }`} >
-

시설물

-
+ {showLayerPanelTitle && ( + <> +

시설물

+
+ + )} {/* DnD Tree */} - +
+ - + +
{LayerSettingView && (
)} + {!detachedToggleButton && ( + + )} + + {detachedToggleButton && visible && ( - + )} {!visible && ( )}