DitapFullscreenButton

전체 화면 모드 단일 버튼 위젯.
A single button widget for toggling fullscreen mode.

new Ditap.DitapFullscreenButton(viewer, fullscreenElement)

Name Type Default Description
viewer DitapViewer 사용할 DitapViewer 인스턴스.
The DitapViewer instance to use.
fullscreenElement Element | string document.body optional 전체 화면 모드로 표시할 요소 또는 ID.
The element or id to be placed into fullscreen mode.
Examples:
// 1. 뷰어 선언 시 활성화
const viewer = new Ditap.DitapViewer("ditapContainer", {
   fullscreenButton: true,
});
// 2. 단독으로 선언하여 활성화
const viewer = new Ditap.DitapViewer("ditapContainer");

new Ditap.DitapFullscreenButton(viewer);

Extends

Members

callbackOffFullscreen : function

전체화면 비활성화 시 호출할 콜백 함수
A callback function to be called when exiting fullscreen mode.

callbackOnFullscreen : function

전체화면 활성화 시 호출할 콜백 함수
A callback function to be called when fullscreen is activated.

container : Element

Gets the parent container.
Inherited From:
Gets the view model.
Inherited From:

Methods

destroy()

위젯 파괴. 영구적으로 제거하는 경우 호출.
Destroys the widget. Should be called if permanently removing the widget from layout.

documentKeydown(e)

키 다운 시 전체화면 버튼 상태 업데이트.
Update the fullscreen button state when a key is pressed.
Name Type Description
e KeyboardEvent 키보드 이벤트 객체.
Keyboard event object.

handleFullscreenChange()

전체화면 상태 변경 이벤트 감지하여 전체화면 버튼 상태 업데이트.
Detect fullscreen state change events to update the fullscreen button state.

isDestroyed() → boolean

Returns:
true if the object has been destroyed, false otherwise.
Inherited From: