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

Universal Viewer #295

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Universal Viewer #295

wants to merge 5 commits into from

Conversation

avertrees
Copy link
Collaborator

@avertrees avertrees commented Feb 21, 2025

Ticket:

  • JIRA ticket xxx

This PR does the following:

Open Questions

How has this been tested? How should a reviewer test this?

Accessibility concerns or updates

Checklist:

  • I have added relevant accessibility documentation for this pull request.
  • All new and existing tests passed.
  • I have updated the CHANGELOG.md.

@avertrees avertrees added WIP Work in progress (don't merge) DON'T MERGE YET labels Feb 21, 2025
Copy link

vercel bot commented Feb 21, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
digital-collections ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 25, 2025 3:47pm

@avertrees
Copy link
Collaborator Author

avertrees commented Feb 21, 2025

update: this is a next js example listed in the UV wiki https://codesandbox.io/p/sandbox/uv-nextjs-example-uh9zi but it doesn't work for me lol

import { init, Viewer } from "universalviewer";

export function useEvent(
viewer: Viewer | undefined,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this correct? I don't see it in the docs.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

useEvent(uv, BaseEvents.CANVAS_INDEX_CHANGE, (i) => {
if (onChangeCanvas) {
if (lastIndex.current !== i) {
const canvas = uv?.extension?.helper.getCanvasByIndex(i);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This breaks but update to (uv as any)?. for now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DON'T MERGE YET WIP Work in progress (don't merge)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants