projectmirador / mirador-dl-plugin Goto Github PK
View Code? Open in Web Editor NEWa Mirador 3 plugin that adds manifest-provided download links to the window options menu
Home Page: https://mirador-download-plugin.netlify.com/
License: Other
a Mirador 3 plugin that adds manifest-provided download links to the window options menu
Home Page: https://mirador-download-plugin.netlify.com/
License: Other
This came up in the usability study.
Excellent example with useful and straightforward example.
Is it possible to load a collection of manifests but not displaying one of them not all in windows?
Thanks.
Split out from sul-dlss/sul-embed#982 (might be better to do this once the dialog has content)
Use a fixed width of 400px for the dialog. If the viewport is less than 400px, the dialog should adjust down in width and add a horizontal scrollbar, as the "Export workspace" dialog does.
This is effectively a Stanford use case, but we have cases where image downloads are restricted to a max of 400px on the long edge. IIIF doesn't have a way of expressing this.
We want to look into some sort of configurable / extendable way to allow the consumers of this plugin to determine that this is the case for an image and display the appropriate links accordingly.
See Example: No-download object
section in sul-dlss/sul-embed#983 for more details.
Example Manifest/Image API:
https://purl.stanford.edu/bb020ty1503/iiif/manifest
https://stacks.stanford.edu/image/iiif/bb020ty1503%252FFU.Roma.UM.1/info.json
Would it be possible to expose the plugin as a single js standalone file, too?
That way a user could just use the Mirador viewer via the mirador.min.js and an additional downloadPlugin.js in the header - instead of having to build his own framework (npm, react, etc.).
Just an idea - I understand using npm webpack/parcel is nicer and a better way in the long run (if someone wants to build his own frontend), but all this hassle for just a simple download button ...
All the examples at https://mirador-download-plugin.netlify.app/ use IIIF presentation level 2 examples. Manifests using IIIF level 3 instead don't work - the plugin loads but no actual page gets shown.
Hi,
I'm using this plugin to provide my own download links with such and such size.
But is it possible to disable the links that are generated by default ?
Thank you.
This came up in the mirador usability study.
Hello! I'm seeing a new issue with Mirador 3.0.0-beta.6 and mirador-dl-plugin 0.11.0 (the latest releases). When I click on the vertical ellipse icon to toggle the download feature, I'm seeing the error written below.
Mirador configuration/instance is here:
Any help or suggestions would be greatly appreciated!
Warning: Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()?
Check the render method of `ForwardRef(Menu)`.
in PluginHook (at WindowTopBarPluginMenu.js:82)
in ul (created by ForwardRef(List))
in ForwardRef(List) (created by WithStyles(ForwardRef(List)))
in WithStyles(ForwardRef(List)) (created by ForwardRef(MenuList))
in ForwardRef(MenuList) (created by ForwardRef(Menu))
in div (created by ForwardRef(Paper))
in ForwardRef(Paper) (created by WithStyles(ForwardRef(Paper)))
in WithStyles(ForwardRef(Paper)) (created by Transition)
in Transition (created by ForwardRef(Grow))
in ForwardRef(Grow) (created by TrapFocus)
in TrapFocus (created by ForwardRef(Modal))
in div (created by ForwardRef(Modal))
in ForwardRef(Portal) (created by ForwardRef(Modal))
in ForwardRef(Modal) (created by ForwardRef(Popover))
in ForwardRef(Popover) (created by WithStyles(ForwardRef(Popover)))
in WithStyles(ForwardRef(Popover)) (created by ForwardRef(Menu))
in ForwardRef(Menu) (created by WithStyles(ForwardRef(Menu)))
in WithStyles(ForwardRef(Menu)) (at WindowTopBarPluginMenu.js:66)
in WindowTopBarPluginMenu (at withPlugins.js:20)
in WithPlugins(WindowTopBarPluginMenu) (created by ConnectFunction)
in ConnectFunction (created by WithStyles(Connect(WithPlugins(WindowTopBarPluginMenu))))
in WithStyles(Connect(WithPlugins(WindowTopBarPluginMenu))) (created by withI18nextTranslation(WithStyles(Connect(WithPlugins(WindowTopBarPluginMenu)))))
in withI18nextTranslation(WithStyles(Connect(WithPlugins(WindowTopBarPluginMenu)))) (at WindowTopBar.js:63)
in div (created by ForwardRef(Toolbar))
in ForwardRef(Toolbar) (created by WithStyles(ForwardRef(Toolbar)))
in WithStyles(ForwardRef(Toolbar)) (at WindowTopBar.js:37)
in nav (at WindowTopBar.js:36)
in header (created by ForwardRef(Paper))
in ForwardRef(Paper) (created by WithStyles(ForwardRef(Paper)))
in WithStyles(ForwardRef(Paper)) (created by ForwardRef(AppBar))
in ForwardRef(AppBar) (created by WithStyles(ForwardRef(AppBar)))
in WithStyles(ForwardRef(AppBar)) (at WindowTopBar.js:35)
in WindowTopBar (at withPlugins.js:26)
in WithPlugins(WindowTopBar) (created by ConnectFunction)
in ConnectFunction (created by WithStyles(Connect(WithPlugins(WindowTopBar))))
in WithStyles(Connect(WithPlugins(WindowTopBar))) (created by withI18nextTranslation(WithStyles(Connect(WithPlugins(WindowTopBar)))))
in withI18nextTranslation(WithStyles(Connect(WithPlugins(WindowTopBar)))) (at Window.js:50)
in div (at Window.js:49)
in section (created by ForwardRef(Paper))
in ForwardRef(Paper) (created by WithStyles(ForwardRef(Paper)))
in WithStyles(ForwardRef(Paper)) (at Window.js:82)
in Window (at withPlugins.js:49)
in WithPlugins(Window) (created by ConnectFunction)
in ConnectFunction (created by WithStyles(Connect(WithPlugins(Window))))
in WithStyles(Connect(WithPlugins(Window))) (created by withI18nextTranslation(WithStyles(Connect(WithPlugins(Window)))))
in withI18nextTranslation(WithStyles(Connect(WithPlugins(Window)))) (at WorkspaceMosaic.js:130)
in div (created by InternalMosaicWindow)
in div (created by InternalMosaicWindow)
in InternalMosaicWindow (created by Context.Consumer)
in DragSource(InternalMosaicWindow) (created by Context.Consumer)
in DropTarget(DragSource(InternalMosaicWindow)) (created by MosaicWindow)
in MosaicWindow (at WorkspaceMosaic.js:123)
in div (created by MosaicRoot)
in div (created by MosaicRoot)
in MosaicRoot (created by Mosaic)
in div (created by Mosaic)
in Mosaic (created by DragDropContext(Mosaic))
in DragDropContext(Mosaic) (at WorkspaceMosaic.js:151)
in WorkspaceMosaic (at withPlugins.js:20)
in WithPlugins(WorkspaceMosaic) (created by ConnectFunction)
in ConnectFunction (created by WithStyles(Connect(WithPlugins(WorkspaceMosaic))))
in WithStyles(Connect(WithPlugins(WorkspaceMosaic))) (at Workspace.js:32)
in div (at Workspace.js:96)
in Workspace (at withPlugins.js:26)
in WithPlugins(Workspace) (created by ConnectFunction)
in ConnectFunction (created by WithStyles(Connect(WithPlugins(Workspace))))
in WithStyles(Connect(WithPlugins(Workspace))) (created by withI18nextTranslation(WithStyles(Connect(WithPlugins(Workspace)))))
in withI18nextTranslation(WithStyles(Connect(WithPlugins(Workspace)))) (at WorkspaceArea.js:37)
in main (at WorkspaceArea.js:26)
in WorkspaceArea (at withPlugins.js:26)
in WithPlugins(WorkspaceArea) (created by ConnectFunction)
in ConnectFunction (created by WithStyles(Connect(WithPlugins(WorkspaceArea))))
in WithStyles(Connect(WithPlugins(WorkspaceArea))) (created by withI18nextTranslation(WithStyles(Connect(WithPlugins(WorkspaceArea)))))
in withI18nextTranslation(WithStyles(Connect(WithPlugins(WorkspaceArea)))) (at App.js:67)
in ThemeProvider (at App.js:64)
in LiveAnnouncer (at App.js:63)
in I18nextProvider (at App.js:62)
in div (created by FullScreen)
in FullScreen (at App.js:58)
in App (at withPlugins.js:26)
in WithPlugins(App) (created by ConnectFunction)
in ConnectFunction (at MiradorViewer.js:32)
in PluginProvider (at MiradorViewer.js:31)
in Provider (at MiradorViewer.js:30)
If the item has nothing to download (e.g., no canvas image and no rendering
property in the manifest):
Try these that are listed in the fixtures: https://github.com/ProjectMirador/mirador/wiki/M3-Fixtures-&-sample-IIIF-data#canvases-with-no-image-or-any-resources
Extracted from sul-dlss/sul-embed#985
We currently do not render the "Zoomed image" link in book mode. The current method for getting the current viewer bounds (OSDViewer.viewer.viewport.getBounds()
) doesn't work as-is in Book mode (e.g. it ends up giving us a wildly incorrect x
parameter).
More info available in sul-dlss/sul-embed#983 (comment)
We have a few options:
I'm working to add the M3 mirador-dl-plugin to the B1G Geoportal. I'm running into some issues with the plugin that are beyond me.
I'm running: mirador@^3.0.0-beta.0 and a local build of the update-dependencies branch, because it appears to be the near future of this plugin.
Here's my WIP feature branch
Alone, the new Mirador beta runs well within my GeoBlacklight instance. When I add the download plugin branch webpack compiles correctly, but when you load a page with mirador in it you see: "Invalid hook call..." ... "... error occurred in the <WithStyles(MiradorDownloadDialog)> component".
Maybe this is related to react-iframe-comm being generally unsupported and adding "Mismatching Versions of React and React DOM"...
https://reactjs.org/warnings/invalid-hook-call-warning.html
ProjectMirador/mirador#2863
pbojinov/react-iframe-comm#14
I'm hoping someone else has encountered this before. If anyone has any advice on how to circumvent this issue, I'd greatly appreciate it.
Hello! I'm running into a two JS console errors attempting to run Mirador with the download plugin. The plugin actually works fine, but the errors are a bit disconcerting.
Error 1 - Chrome 78 / FF 70 / Safari 13
"Failed prop type: Invalid prop infoResponse
of type boolean
supplied to MiradorDownloadDialog
, expected object
."
Error 2 - Chrome 78 (Only)
"Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()?"
Please let me know if you need any additional information. My feature branch is linked above.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.