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

Use manifest/name as canvas label, to ensure uniqueness #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pbinkley
Copy link

Fixes #3

I've just used the existing manifest variable to pass the manifest name to the two methods that write Jekyll-style Markdown headers for annotations lists. They compose the canvas label in the form manifest + '/' + name. I haven't changed the annotations in the examples to use this form; they'll only have this problem if more examples are added that use the same canvas names as one of the existing ones.

I've tested it with bnf640. The copperfield example isn't working for me (every annotation I create gets assigned to 10.json); I haven't investigated why.

@pbinkley
Copy link
Author

Whoops, it breaks if there are already annotations for that canvas. Hang on...

@pbinkley
Copy link
Author

It turns out it does matter if new annotations are added to a canvas that already has annotations. The list.json doesn't get updated, so it still looks for the label f10 while the updated f10.json uses the label bnf640/f10. I'll leave it as is but if you think this is worth merging I'd be happy to update Rakefile to make sure list.json agrees with the annotation file, or else just to update all the list.json in the examples so that the problem won't arise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Problem when canvas labels are not unique across items
1 participant