-
Notifications
You must be signed in to change notification settings - Fork 33
0599 Drag and Drop #647
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
base: master
Are you sure you want to change the base?
0599 Drag and Drop #647
Conversation
Initial commit to version control ⚡️
recipe/0599-drag-and-drop/index.md
Outdated
| "type": "Manifest" | ||
| } | ||
| }); | ||
| } |
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 was testing this with my demo site: https://iiif.gdmrdigital.com/import_to_viewers/DragDropDestination.html to see if I could get it working. I had to make an update as you set the data type as text/plain which I think is correct but my app didn't use that value so that should be fixed now.
The other issue I came across is that I think dataTransfer only transfers Strings so when you put the JSON in as the data it converts it to a string of object [object] and you loose the data. I think you need to wrap that in JSON.stringify() to ensure the annotation is converted into a String before passing it .
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.
Thanks! I was starting with the bits from that Slack conversation, so I'm happy to get updates.
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.
The logo image has disappeared
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.
On the other hand, when I drag from the recipe in progress I get a strange error in the browser tools:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://newspapers.library.wales/iiif/2.0/image/3412218/info.json. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing). Status code: 403.
Even though the manifest in the script in the recipe is https://iiif.io/api/cookbook/recipe/0006-text-language/manifest.json, not the Wales library one.
Committing a touch early to possibly show to cookbook authors call
Closes #599