ZoomOutButtonUI Class
Represents a button in the PDF viewer toolbar that decreases the magnification level of the document view.
export declare class ZoomOutButtonUI implements VisibilityElement, EventElement<ZoomOutButtonEventMap>
- Inheritance:
-
ZoomOutButtonUI
Remarks
This component provides functionality for zooming out on the document, handling zoom changes with before/after information.
Properties
isVisible
The current visibility state of the element.
get isVisible(): boolean;
set isVisible(value: boolean);
Parameters
-
value
The new visibility state (true to show, false to hide).
Methods
addEventListener(K, (event: ZoomOutButtonEventMap[K]) => void)
Adds an event listener for the specified event type.
addEventListener<K extends keyof ZoomOutButtonEventMap>(type: K, listener: (event: ZoomOutButtonEventMap[K]) => void): void;
Parameters
-
type
The event type/name to listen for.
-
listener
The callback function that will be invoked when the event is emitted.
click
Decreases the zoom level by one step.
click(): Promise<void>;
Remarks
This method calculates the previous appropriate zoom level based on predefined steps and emits ZoomOutClickEvent before applying the change.