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

Required statement #155

Open
stephenwf opened this issue Mar 7, 2022 · 0 comments
Open

Required statement #155

stephenwf opened this issue Mar 7, 2022 · 0 comments

Comments

@stephenwf
Copy link
Member

As canvas panel only renders a canvas, it does not always have information about the manifest that contains it. However, if people are using manifests from collections they should be aware of required statements containing rights and usage information that they may need to display.

Canvas panel won't display the required statement for the user (at the moment). However it could help users identify the required statement.

In the simplest case:

<canvas-panel manifest-id="https://example.org/manifest" canvas-id="..." />

The Vault will know the manifest, can be able to resolve the required statement.

Even in a case where the resource is loaded in a vault, but the manifest id is not given.

<canvas-panel id="cp" />
<script>
  const cp = document.getElementById('cp');
  const manifest = cp.vault.loadManifest('https://example.org/manifest');
  
  // cp.setManifest(manifest.id);
  cp.setCanvas(manifest.items[0].id);
</script>

There is a (slowish) route to resolving where the canvas came from, and grabbing the required statement.

A Vault API like:

vault.getRequiredStatement(anything); // manifest, canvas, range etc..

Could be a Canvas Panel API that is:

cp.getRequiredStatement();

And make it easier for developers to get this information.

If only a canvas is imported into a vault, without a manifest, then it's up to the containing application to know or get the required statement.

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

No branches or pull requests

1 participant