Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.

Commit 5f96fa3

Browse files
committed
default viewingdirection
1 parent 3ef383f commit 5f96fa3

File tree

7 files changed

+20
-16
lines changed

7 files changed

+20
-16
lines changed

dist/iiif-gallery-component.bundle.js

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

dist/iiif-gallery-component.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// iiif-gallery-component v1.1.4 https://github.com/iiif-commons/iiif-gallery-component#readme
1+
// iiif-gallery-component v1.1.5 https://github.com/iiif-commons/iiif-gallery-component#readme
22
/// <reference types="jquery" />
33
interface JQuery {
44
link: any;

dist/iiif-gallery-component.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// iiif-gallery-component v1.1.4 https://github.com/iiif-commons/iiif-gallery-component#readme
2-
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.iiifGalleryComponent = f()}})(function(){var define,module,exports;return (function(){function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s}return e})()({1:[function(require,module,exports){
1+
// iiif-gallery-component v1.1.5 https://github.com/iiif-commons/iiif-gallery-component#readme
2+
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.iiifGalleryComponent = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
33
(function (global){
44

55
var __extends = (this && this.__extends) || (function () {
@@ -51,7 +51,8 @@ var IIIFComponents;
5151
this._$element.append(this._$main);
5252
this._$thumbs = $('<div class="thumbs"></div>');
5353
this._$main.append(this._$thumbs);
54-
this._$thumbs.addClass(this.options.data.helper.getViewingDirection().toString()); // defaults to "left-to-right"
54+
var viewingDirection = this.options.data.helper.getViewingDirection() || manifesto.ViewingDirection.leftToRight();
55+
this._$thumbs.addClass(viewingDirection.toString()); // defaults to "left-to-right"
5556
this._$sizeDownButton.on('click', function () {
5657
var val = Number(_this._$sizeRange.val()) - 1;
5758
if (val >= Number(_this._$sizeRange.attr('min'))) {
@@ -484,4 +485,4 @@ var IIIFComponents;
484485

485486
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
486487
},{}]},{},[1])(1)
487-
});
488+
});

dist/iiif-gallery-component.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/js/iiif-gallery-component.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// iiif-gallery-component v1.1.4 https://github.com/iiif-commons/iiif-gallery-component#readme
2-
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.iiifGalleryComponent = f()}})(function(){var define,module,exports;return (function(){function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s}return e})()({1:[function(require,module,exports){
1+
// iiif-gallery-component v1.1.5 https://github.com/iiif-commons/iiif-gallery-component#readme
2+
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.iiifGalleryComponent = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
33
(function (global){
44

55
var __extends = (this && this.__extends) || (function () {
@@ -51,7 +51,8 @@ var IIIFComponents;
5151
this._$element.append(this._$main);
5252
this._$thumbs = $('<div class="thumbs"></div>');
5353
this._$main.append(this._$thumbs);
54-
this._$thumbs.addClass(this.options.data.helper.getViewingDirection().toString()); // defaults to "left-to-right"
54+
var viewingDirection = this.options.data.helper.getViewingDirection() || manifesto.ViewingDirection.leftToRight();
55+
this._$thumbs.addClass(viewingDirection.toString()); // defaults to "left-to-right"
5556
this._$sizeDownButton.on('click', function () {
5657
var val = Number(_this._$sizeRange.val()) - 1;
5758
if (val >= Number(_this._$sizeRange.attr('min'))) {
@@ -484,4 +485,4 @@ var IIIFComponents;
484485

485486
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
486487
},{}]},{},[1])(1)
487-
});
488+
});

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "iiif-gallery-component",
3-
"version": "1.1.4",
3+
"version": "1.1.5",
44
"description": "",
55
"main": "index.js",
66
"types": "./dist/iiif-gallery-component.d.ts",
@@ -24,8 +24,8 @@
2424
"base-component": "iiif-commons/base-component#v1.1.2",
2525
"exjs": "BSick7/exjs#0.5.0",
2626
"jquery-plugins": "edsilv/jquery-plugins#v1.0.0",
27-
"manifesto.js": "2.2.2",
28-
"@iiif/manifold": "1.2.17",
27+
"manifesto.js": "2.2.25",
28+
"@iiif/manifold": "1.2.26",
2929
"utils": "edsilv/utils#v0.2.1"
3030
}
3131
}

src/GalleryComponent.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,9 @@ namespace IIIFComponents {
6969
this._$thumbs = $('<div class="thumbs"></div>');
7070
this._$main.append(this._$thumbs);
7171

72-
this._$thumbs.addClass(this.options.data.helper.getViewingDirection().toString()); // defaults to "left-to-right"
72+
const viewingDirection: Manifesto.ViewingDirection = this.options.data.helper.getViewingDirection() || manifesto.ViewingDirection.leftToRight();
73+
74+
this._$thumbs.addClass(viewingDirection.toString()); // defaults to "left-to-right"
7375

7476
this._$sizeDownButton.on('click', () => {
7577
var val = Number(this._$sizeRange.val()) - 1;

0 commit comments

Comments
 (0)