컨테이너 및 스윔레인

컨테이너를 사용하면 보드에서 프레임 영역, 스윔레인, UML 패키지 블록 및 기타 부모-자식 구조를 표현할 수 있습니다. 컨테이너 소속 정보는 자식 요소의 parentId에 저장되며, 스윔레인의 경우 laneId에도 저장됩니다.

컨테이너 만들기

TypeScript
const board = univerAPI.getActiveBoard()if (!board) throw new Error('No active Board')const containerId = 'scope'const containerCreated = board.createContainer({  id: containerId,  title: 'Scope',  left: 80,  top: 80,  width: 640,  height: 360,})if (!containerCreated) {  throw new Error('Cannot create container')}

요소를 컨테이너로 이동하기

TypeScript
board.moveElementsToContainer(['card-1', 'card-2'], containerId)board.fitContainerToContent(containerId)

소속 동작 설정하기

TypeScript
board.setContainerMembershipLocked(containerId, true)board.setContainerAutoResize(containerId, false)

스윔레인

스윔레인은 레인 설정이 있는 컨테이너입니다. 전용 퍼사드 API를 사용하여 레인을 추가, 제거, 크기 조절, 순서 변경, 축소 및 이름 변경할 수 있습니다.

TypeScript
const swimlaneId = 'delivery'const swimlaneCreated = board.createSwimlane({  id: swimlaneId,  left: 80,  top: 80,  width: 720,  height: 360,  orientation: 'horizontal',  lanes: [    { id: 'todo', title: 'Todo', size: 240 },    { id: 'done', title: 'Done', size: 240 },  ],})if (!swimlaneCreated) {  throw new Error('Cannot create swimlane')}board.renameSwimlaneLane(swimlaneId, 'todo', 'Backlog')

이 가이드는 어떠셨나요?

© 2026 DreamNum Co., Ltd.