Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tify

Package Overview
Dependencies
Maintainers
2
Versions
80
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tify - npm Package Compare versions

Comparing version 0.20.1 to 0.20.5

test/iiif-api/data/manifests/gdz-DE_611_BF_5619_1801_1806.json

4

package.json
{
"name": "tify",
"version": "0.20.1",
"version": "0.20.5",
"description": "TIFY is a slim and mobile-friendly IIIF document viewer.",

@@ -13,3 +13,3 @@ "homepage": "https://github.com/subugoe/tify",

},
"author": "Tobias Schäfer / SUB Göttingen <tschaefer@sub.uni-goettingen.de>",
"author": "SUB Göttingen <info@sub.uni-goettingen.de>",
"license": "AGPL-3.0",

@@ -16,0 +16,0 @@ "scripts": {

@@ -45,3 +45,2 @@ import Vue from 'vue';

case 'language':
case 'title':
if (typeof window.tifyOptions[key] !== 'string') {

@@ -51,2 +50,3 @@ throw new Error(`TIFY option "${key}" must be a string`);

break;
case 'title':
case 'manifest':

@@ -53,0 +53,0 @@ case 'stylesheet':

@@ -57,2 +57,3 @@ module.exports = {

},
currentStructure() {

@@ -71,13 +72,20 @@ if (!Array.isArray(this.$root.manifest.structures)) {

const { length } = this.$root.manifest.structures;
let indexOfStructureWithSmallestRange;
let smallestRange;
for (let i = 0; i < length; i += 1) {
const { canvases } = this.$root.manifest.structures[i];
const structure = this.$root.manifest.structures[i];
const { canvases } = structure;
if (canvases.some(canvasId => currentCanvasIds.indexOf(canvasId) > -1)) {
return this.$root.manifest.structures[i];
if (structure.firstPage && structure.lastPage) {
const currentRange = structure.lastPage - structure.firstPage;
if ((currentRange < smallestRange) || !smallestRange) {
indexOfStructureWithSmallestRange = i;
smallestRange = currentRange;
if (smallestRange === 0) break;
}
}
}
}
return false;
},
currentStructureMetadata() {
if (this.currentStructure.metadata && this.currentStructure.metadata.length) {
return this.currentStructure.metadata;
if (typeof indexOfStructureWithSmallestRange === 'number' && indexOfStructureWithSmallestRange >= 0) {
return this.$root.manifest.structures[indexOfStructureWithSmallestRange];
}

@@ -87,3 +95,12 @@

},
currentStructureLabel() {
const { label } = this.currentStructure;
return label;
},
currentStructureMetadata() {
const { metadata } = this.currentStructure;
return metadata;
},
},
};

@@ -36,1 +36,14 @@ Feature('Info');

});
Scenario('Show metadata of a nested structure', (I) => {
I.amOnPage('http://localhost:8080/?manifest=http://localhost:8081/manifest/gdz-DE_611_BF_5619_1801_1806.json');
I.waitForElement('.tify-app_main');
I.click('Next page');
I.click('Next page');
I.click('Next page');
I.click('Next page');
I.click('Info');
I.see('Current Element');
I.see('[Brief des Barons von Asch an Heyne vom 29.01./10.02.1801]', '.tify-info_section.-metadata.-structure');
});

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc