interface IPosition { x: number; y: number; } export default class ZoomAnyJs { #private; /** * Selects the DOM element to be manipulated using the provided selector. * If no selector is provided, it defaults to ".zoomable". * Adds event listeners to the selected element, including the wheel event listener for zooming. * Adjusts the element's position to fit within its bounds when data-binds enabled. * * @param {string} [elementSelector='.zoomable'] - The CSS selector for the element to zoom. Defaults to ".zoomable". */ constructor(elementSelector?: string); /** * Resets the internal values of the zoom element to their default state. * This includes setting the x and y coordinates to 0 and the zoom level to 100. */ reset(): void; /** * Retrieves the current zoom level of the element. * * @returns {number} The current zoom level. */ getZoom(): number; /** * Sets the current zoom level of the element. * * @param {number} value - The value the zoom level is set to. */ setZoom(value: number): void; /** * Sets the position values (x and y coordinates) for the element. * * @param {IPosition} value - An object containing the x and y coordinates to set. */ setPos(value: IPosition): void; /** * Retrieves the current position values (x and y coordinates) of the element. * * @returns {IPosition} An object containing the current x and y coordinates. */ getPos(): IPosition; /** * Centers the element within its container. * The container can either be the window or the element's parent, depending on data-origin-parent. */ center(): void; /** * Adjusts the position of the element to fit within its bounds. * The bounds are determined based on the element's data-origin and the presence of the `data-bounds` attribute. * * If the `data-bounds` attribute is present, the method checks whether the element fits within the * specified bounds (window or parent). If not, it adjusts the position so that the element is * visible within the bounds. * * The adjustment logic is as follows: * - If the element is smaller than the available space, it is centered within the bounds. * - If the element overflows in either dimension (x or y), its position is adjusted to fit within * the available space, with the option of setting its position to zero if it is already out of bounds. */ fitToBounds(): void; /** * Zooms the element based on the given amplitude and position. * The zoom effect scales the element's size and adjusts its position to zoom in or out * relative to a specified point (pos). Zoom levels are constrained within the minimum and * maximum zoom limits defined in the element's dataset (data-min-zoom and data-max-zoom). * * @param {number} amplitude - The zoom factor. Values greater than 1 zoom in, while values less than 1 zoom out. * @param {{ x: number, y: number }} pos - The position (x, y) to zoom towards. */ zoomAt(amplitude: number, pos: { x: number; y: number; }): void; /** * Adds event listeners to the element for handling user interactions. * Specifically, it adds a wheel event listener to manage zooming functionality. */ addListeners(): void; /** * Removes event listeners from the element to stop handling user interactions. * Specifically, it removes the wheel event listener that manages zooming functionality. */ removeListeners(): void; /** * Applies the current transformation and position values to the element. * Has to be called everytime you want to apply changes to the element, e.g. after zoomAt() */ apply(): void; /** * Removes all listeners and css changes, basically reverting the element back to before using the plugin */ destroy(): void; } export {};