1.2.4 • Published 5 years ago

@dbmdz/mirador-canvaslink v1.2.4

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

Link to the current canvas

NPM Maven Central

Adds an extra button to every window that displays a link to the currently shown canvas. The URL will look like this:

<canvas uri>/view

NOTE: This means that the server serving the manifest needs a rule for resolving this URL.

Installation

You can find production-ready build artifacts in the releases section.

Alternatively, you can use npm to install the artifacts:

$ npm install @dbmdz/mirador-canvaslink

If you have a Java Web-Application managed with mvn, there is also a WebJar, which can be included as follows:

<dependency>
  <groupId>org.webjars.npm</groupId>
  <artifactId>dbmdz__mirador-canvaslink</artifactId>
  <version>{set to current version}</version>
</dependency>

Usage

  • enable the plugin by including the CSS and the JavaScript (after loading Mirador):
<link rel="stylesheet" type="text/css" href="<url to the plugin>/canvasLink.min.css" />
...
<script src="<url to the plugin>/canvasLink.min.js"></script>
  • include the ShareButtons extension - the usage is explained in the corresponding README - if you want to have some share buttons displayed in the modal dialog

  • configure the modal dialog containing the canvas link with the canvasLink configuration attribute in your Mirador configuration:

var mirador = Mirador({
  ...
  canvasLink: {
    // Display an info that the website containing the Mirador instance is left by clicking on the share buttons, default is false
    showShareButtonsInfo: true,
    // Define the url extension appended to the canvas url, default is /view
    urlExtension: '/example'
  }
  ...
});

NOTE: The configuration key showShareButtonsInfo is only evaluated, if you have also included the ShareButtons extension.

1.2.4

5 years ago

1.2.3

5 years ago

1.2.2

6 years ago

1.2.1

6 years ago

1.2.0

6 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.0

7 years ago

0.0.5

7 years ago

0.0.3

7 years ago

0.0.1

7 years ago

0.0.2

7 years ago

0.0.1-1

7 years ago

0.0.1-0

7 years ago