Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add getInfo #75

Merged
merged 1 commit into from
Dec 20, 2024
Merged

add getInfo #75

merged 1 commit into from
Dec 20, 2024

Conversation

likashefqet
Copy link
Owner

/**
  * Retrieves detailed information about the zoomable component, including container dimensions,
  * scaled size, visible area (relative to the scaled component), and transformation values.
  *
  * @returns An object containing:
  * - `container`: The original container's dimensions and center point.
  *   - `width`: The width of the container.
  *   - `height`: The height of the container.
  *   - `center`: The center coordinates of the container.
  * - `scaledSize`: The dimensions of the component after applying the current scale.
  *   - `width`: The scaled width.
  *   - `height`: The scaled height.
  * - `visibleArea`: The visible region of the scaled component.
  *   - `x`: The x-coordinate of the top-left corner of the visible area (relative to the scaled component).
  *   - `y`: The y-coordinate of the top-left corner of the visible area (relative to the scaled component).
  *   - `width`: The width of the visible area (matches container width).
  *   - `height`: The height of the visible area (matches container height).
  * - `transformations`: The current transformation values.
  *   - `translateX`: The horizontal translation value (including focal point adjustment).
  *   - `translateY`: The vertical translation value (including focal point adjustment).
  *   - `scale`: The current scale factor.
  */
getInfo: GetInfoCallback;

@likashefqet likashefqet self-assigned this Dec 20, 2024
@likashefqet likashefqet merged commit 217981b into main Dec 20, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant