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

have viewer update with xywh coordinates #4027

Closed
wants to merge 1 commit into from
Closed

Conversation

dnoneill
Copy link
Collaborator

No description provided.

@dnoneill dnoneill force-pushed the xywh-cords branch 3 times, most recently from fac7ec2 to 4aac0dd Compare December 10, 2024 21:45
@cbeer cbeer requested review from cbeer and marlo-longley December 10, 2024 21:52
@marlo-longley
Copy link
Member

marlo-longley commented Dec 10, 2024

Hi Niqui --
The values in the new data-xywh-coords attribute seem significantly different than what is in the Mirador state. Is this what you would expect? For example, the x value in the screenshot is 1348 vs 14.

Screenshot 2024-12-10 at 6 56 28 PM

Also, what is the purpose of the data-parent-window-id attribute?

@cbeer
Copy link
Collaborator

cbeer commented Dec 11, 2024

The mirador state is the center of the window, and Niqui's x/y coordinates are the top-left corner. That said, I'm not sure I understand the benefits of exposing this in the DOM vs using the redux state (or OSD viewer) directly. Is this a niche feature for sul-dlss/exhibits#2604 (maybe?) or is there some general utility?

@marlo-longley
Copy link
Member

I know that getExportableState(currentState) is used to get coordinates in other applications such as MISE at Stanford.

@dnoneill
Copy link
Collaborator Author

I need the xywh coordinates to update the thumbnail view. So exhibits has the thumbnail that points the the IIIF image. In order to update that view, we need to be able to have the IIIF coordinates.

@cbeer
Copy link
Collaborator

cbeer commented Dec 11, 2024

That seems like a use case pretty specific to Stanford's applications, and more appropriate as a local plugin? sul-dlss/sul-embed#2279

@dnoneill
Copy link
Collaborator Author

That works. Thanks.

@dnoneill dnoneill closed this Dec 11, 2024
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.

3 participants