-
Notifications
You must be signed in to change notification settings - Fork 0
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
base: main
Are you sure you want to change the base?
Universal Viewer #295
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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, |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i really don't know. code came from https://codesandbox.io/p/sandbox/uv-nextjs-example-239ff5?file=%2Flib%2Fuse-universalviewer.ts%3A9%2C26
useEvent(uv, BaseEvents.CANVAS_INDEX_CHANGE, (i) => { | ||
if (onChangeCanvas) { | ||
if (lastIndex.current !== i) { | ||
const canvas = uv?.extension?.helper.getCanvasByIndex(i); |
There was a problem hiding this comment.
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
Ticket:
This PR does the following:
tries to add Universal Viewer to DCFL using https://github.com/UniversalViewer/universalviewer/blob/dev/npm-examples/react-scripts/src/App.js and https://codesandbox.io/p/sandbox/uv-nextjs-example-239ff5?file=%2Fcomponents%2FUniversalViewerLazy.tsx%3A1%2C1-6%2C1
example: /items/9a3af080-2289-0132-ded5-58d385a7bbd0
Open Questions
How has this been tested? How should a reviewer test this?
Accessibility concerns or updates
Checklist: