Skip to content

Commit

Permalink
Fixed: Linking to IIIF manifests
Browse files Browse the repository at this point in the history
Refs #460
  • Loading branch information
ahankinson committed Sep 3, 2018
1 parent e438a4a commit 8d3f7d7
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions source/js/plugins/metadata.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,12 @@ export default class MetadataPlugin
}

// add link to manifest
let linkToManifest = document.createElement('h4');
linkToManifest.innerHTML = "<a target='_blank' href="+this.core.settings.objectData+">Link To Manifest</a>";
let linkToManifest = document.createElement('p');
let manifestAnchor = document.createElement('a');
manifestAnchor.setAttribute("target", "_blank");
manifestAnchor.setAttribute("href", `${this.core.settings.objectData}`);
manifestAnchor.innerHTML = "IIIF Manifest";
linkToManifest.appendChild(manifestAnchor);
contentDiv.appendChild(linkToManifest);

metadataDiv.appendChild(closeButton);
Expand Down Expand Up @@ -124,8 +128,8 @@ export default class MetadataPlugin
pos2 = pos4 - e.clientY;
pos3 = e.clientX;
pos4 = e.clientY;
metadataDiv.style.top = (metadataDiv.offsetTop - pos2) + 'px';
metadataDiv.style.left = (metadataDiv.offsetLeft - pos1) + 'px';
metadataDiv.style.top = `${(metadataDiv.offsetTop - pos2)}px`;
metadataDiv.style.left = `${(metadataDiv.offsetLeft - pos1)}px`;
};

document.onmouseup = () =>
Expand Down

0 comments on commit 8d3f7d7

Please sign in to comment.