Skip to content

Conversation

@triplingual
Copy link
Contributor

Closes #599

"type": "Manifest"
}
});
}
Copy link
Member

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 .

Copy link
Contributor Author

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.

Copy link
Contributor Author

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

Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Cookbook group review

Development

Successfully merging this pull request may close these issues.

Drag and Drop

3 participants