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

Commit 3ef383f

Browse files
committed
removed extensions, included utils
1 parent de66f17 commit 3ef383f

12 files changed

+1424
-286
lines changed

dist/iiif-gallery-component.bundle.js

Lines changed: 695 additions & 126 deletions
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.3 https://github.com/iiif-commons/iiif-gallery-component#readme
1+
// iiif-gallery-component v1.1.4 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: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// iiif-gallery-component v1.1.3 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 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})({1:[function(require,module,exports){
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){
33
(function (global){
44

55
var __extends = (this && this.__extends) || (function () {
@@ -119,9 +119,9 @@ var IIIFComponents;
119119
var searchResults = Number(this.data.data.searchResults);
120120
if (searchResults) {
121121
if (searchResults > 1) {
122-
return String.format(that.options.data.content.searchResults, searchResults);
122+
return Utils.Strings.format(that.options.data.content.searchResults, searchResults.toString());
123123
}
124-
return String.format(that.options.data.content.searchResult, searchResults);
124+
return Utils.Strings.format(that.options.data.content.searchResult, searchResults.toString());
125125
}
126126
return null;
127127
}
@@ -238,7 +238,7 @@ var IIIFComponents;
238238
heights.push(initialHeight);
239239
thumb.multiSelectEnabled = multiSelectState.isEnabled;
240240
}
241-
var medianHeight = Math.median(heights);
241+
var medianHeight = Utils.Maths.median(heights);
242242
for (var i_3 = 0; i_3 < this._thumbs.length; i_3++) {
243243
var thumb = this._thumbs[i_3];
244244
thumb.initialHeight = medianHeight;
@@ -443,8 +443,8 @@ var IIIFComponents;
443443
this._updateThumbs();
444444
};
445445
GalleryComponent.prototype._setRange = function () {
446-
var norm = Math.normalise(Number(this._$sizeRange.val()), 0, 10);
447-
this._range = Math.clamp(norm, 0.05, 1);
446+
var norm = Utils.Maths.normalise(Number(this._$sizeRange.val()), 0, 10);
447+
this._range = Utils.Maths.clamp(norm, 0.05, 1);
448448
};
449449
GalleryComponent.prototype._setThumbMultiSelected = function (thumb, selected) {
450450
$.observable(thumb).setProperty("multiSelected", selected);

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/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<script src="https://unpkg.com/manifesto.js/dist/client/manifesto.bundle.js"></script>
2020
<script src="https://unpkg.com/@iiif/manifold/dist/manifold.js"></script>
2121
<script src="js/base-component.js"></script>
22-
<script src="js/extensions.js"></script>
22+
<script src="js/utils.js"></script>
2323
<script src="js/iiif-gallery-component.js"></script>
2424
<script src="js/jquery-plugins.js"></script>
2525
</head>

examples/js/extensions.js

Lines changed: 0 additions & 131 deletions
This file was deleted.

examples/js/iiif-gallery-component.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// iiif-gallery-component v1.1.3 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 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})({1:[function(require,module,exports){
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){
33
(function (global){
44

55
var __extends = (this && this.__extends) || (function () {
@@ -119,9 +119,9 @@ var IIIFComponents;
119119
var searchResults = Number(this.data.data.searchResults);
120120
if (searchResults) {
121121
if (searchResults > 1) {
122-
return String.format(that.options.data.content.searchResults, searchResults);
122+
return Utils.Strings.format(that.options.data.content.searchResults, searchResults.toString());
123123
}
124-
return String.format(that.options.data.content.searchResult, searchResults);
124+
return Utils.Strings.format(that.options.data.content.searchResult, searchResults.toString());
125125
}
126126
return null;
127127
}
@@ -238,7 +238,7 @@ var IIIFComponents;
238238
heights.push(initialHeight);
239239
thumb.multiSelectEnabled = multiSelectState.isEnabled;
240240
}
241-
var medianHeight = Math.median(heights);
241+
var medianHeight = Utils.Maths.median(heights);
242242
for (var i_3 = 0; i_3 < this._thumbs.length; i_3++) {
243243
var thumb = this._thumbs[i_3];
244244
thumb.initialHeight = medianHeight;
@@ -443,8 +443,8 @@ var IIIFComponents;
443443
this._updateThumbs();
444444
};
445445
GalleryComponent.prototype._setRange = function () {
446-
var norm = Math.normalise(Number(this._$sizeRange.val()), 0, 10);
447-
this._range = Math.clamp(norm, 0.05, 1);
446+
var norm = Utils.Maths.normalise(Number(this._$sizeRange.val()), 0, 10);
447+
this._range = Utils.Maths.clamp(norm, 0.05, 1);
448448
};
449449
GalleryComponent.prototype._setThumbMultiSelected = function (thumb, selected) {
450450
$.observable(thumb).setProperty("multiSelected", selected);

0 commit comments

Comments
 (0)