주요 콘텐츠로 건너뛰기

scroll()

설명

Kanban을 지정된 요소로 스크롤합니다.

사용법

scroll({
id: string | number,
to: "column" | "row" | "card",
options?: object
}): void;

매개변수

  • id - (필수) 대상 요소의 ID
  • to - (필수) 대상 요소의 유형. 가능한 값은 "column", "row", "card"입니다.
  • options - (선택) 스크롤 옵션 객체. 스크롤 매개변수 전체 목록은 여기에서 확인할 수 있습니다.

예제

// Kanban 생성
const board = new kanban.Kanban("#root", {
columns,
cards
});
// ID가 246인 카드로 Kanban을 스크롤
board.scroll({
id: 246,
to: "card",
options: {
behavior: "smooth",
block: "end",
inline: "nearest"
}
});

변경 로그: 이 메서드는 v1.2에 추가되었습니다.