컨테이너 및 스윔레인
컨테이너는 프레임 영역, 스릴, 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)스윔레인
수영은 차선 윤곽을 가진 콘테이너입니다. 전용 정면 APIs는, 제거, 크기, reorder, 붕괴 및 이름을 차선 추가합니다.
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')이 가이드는 어떠셨나요?