Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"trailingComma": "es5"
}
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"less": "4.1.2",
"less-loader": "10.1.0",
"lodash": "4.17.21",
"prettier": "^2.8.8",
"prettier": "^3.5.3",
"prettier-check": "^2.0.0",
"puppeteer": "^23",
"source-map-loader": "^5.0.0",
Expand Down
5 changes: 4 additions & 1 deletion src/content-handlers/iiif/BaseConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ export { StorageType } from "@edsilv/utils";
export type MetricType = string | "sm" | "md" | "lg" | "xl";

export class Metric {
constructor(public type: MetricType, public minWidth: number) {}
constructor(
public type: MetricType,
public minWidth: number
) {}
}

export type Options = {
Expand Down
21 changes: 11 additions & 10 deletions src/content-handlers/iiif/JQueryPlugins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,16 +196,17 @@ export default function jqueryPlugins($) {
let maxTabIndex: number = 0;
let $elementWithGreatestTabIndex: JQuery | null = null;

$self
.find("*:visible[tabindex]")
.each(function (index: number, el: Element) {
const $el: JQuery = $(el);
const tabIndex: number = parseInt($el.attr("tabindex"));
if (tabIndex > maxTabIndex) {
maxTabIndex = tabIndex;
$elementWithGreatestTabIndex = $el;
}
});
$self.find("*:visible[tabindex]").each(function (
index: number,
el: Element
) {
const $el: JQuery = $(el);
const tabIndex: number = parseInt($el.attr("tabindex"));
if (tabIndex > maxTabIndex) {
maxTabIndex = tabIndex;
$elementWithGreatestTabIndex = $el;
}
});

return $elementWithGreatestTabIndex;
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
html.ios {
--ion-default-font: -apple-system, BlinkMacSystemFont, "Helvetica Neue",
"Roboto", sans-serif;
--ion-default-font:
-apple-system, BlinkMacSystemFont, "Helvetica Neue", "Roboto", sans-serif;
}
html.md {
--ion-default-font: "Roboto", "Helvetica Neue", sans-serif;
Expand Down Expand Up @@ -212,9 +212,12 @@ html.plt-ios.plt-pwa {
}
.md .menu-content-push,
.md .menu-content-reveal {
-webkit-box-shadow: 0 2px 22px 0 rgba(0, 0, 0, 0.09),
-webkit-box-shadow:
0 2px 22px 0 rgba(0, 0, 0, 0.09),
4px 0 16px 0 rgba(0, 0, 0, 0.18);
box-shadow:
0 2px 22px 0 rgba(0, 0, 0, 0.09),
4px 0 16px 0 rgba(0, 0, 0, 0.18);
box-shadow: 0 2px 22px 0 rgba(0, 0, 0, 0.09), 4px 0 16px 0 rgba(0, 0, 0, 0.18);
}
audio,
canvas,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -450,9 +450,8 @@ const DownloadDialogue = ({

function getCurrentViewLabel() {
let label: string = content.currentViewAsJpg;
const dimensions: CroppedImageDimensions | null = getCroppedImageDimensions(
getSelectedCanvas()
);
const dimensions: CroppedImageDimensions | null =
getCroppedImageDimensions(getSelectedCanvas());

// dimensions
if (dimensions) {
Expand Down Expand Up @@ -664,9 +663,8 @@ const DownloadDialogue = ({
<li className="option single">
<button
onClick={() => {
const imageUri: string | null = getConfinedImageUri(
getSelectedCanvas()
);
const imageUri: string | null =
getConfinedImageUri(getSelectedCanvas());

if (imageUri) {
window.open(imageUri);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { IIIFEvents } from "../../IIIFEvents";
import { Dialogue } from "../uv-shared-module/Dialogue";

export class ShareDialogue<
T extends BaseConfig["modules"]["shareDialogue"]
T extends BaseConfig["modules"]["shareDialogue"],
> extends Dialogue<T> {
copyToClipboardEnabled = true;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { BaseConfig } from "../../BaseConfig";
import { FooterPanel as BaseFooterPanel } from "../uv-shared-module/FooterPanel";

export class FooterPanel<
T extends BaseConfig["modules"]["footerPanel"]
T extends BaseConfig["modules"]["footerPanel"],
> extends BaseFooterPanel<T> {
constructor($element: JQuery) {
super($element);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -466,9 +466,8 @@ export class OpenSeadragonCenterPanel extends CenterPanel<
let contrastPercent = settings.contrastPercent;
let brightnessPercent = settings.brightnessPercent;
let saturationPercent = settings.saturationPercent;
(<HTMLCanvasElement>(
this.$canvas[0].children[0]
)).style.filter = `contrast(${contrastPercent}%) brightness(${brightnessPercent}%) saturate(${saturationPercent}%)`;
(<HTMLCanvasElement>this.$canvas[0].children[0]).style.filter =
`contrast(${contrastPercent}%) brightness(${brightnessPercent}%) saturate(${saturationPercent}%)`;
}

// disable right click on canvas
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { Bools } from "@edsilv/utils";
import { BaseConfig } from "../../BaseConfig";

export class CenterPanel<
T extends BaseConfig["modules"]["centerPanel"]
T extends BaseConfig["modules"]["centerPanel"],
> extends BaseView<T> {
title: string | null;
subtitle: string | null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Maths } from "@edsilv/utils";
import { BaseConfig } from "../../BaseConfig";

export class Dialogue<
T extends BaseConfig["modules"]["dialogue"]
T extends BaseConfig["modules"]["dialogue"],
> extends BaseView<T> {
allowClose: boolean = true;
isActive: boolean = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Events } from "../../../../Events";
import { BaseConfig } from "../../BaseConfig";

export class FooterPanel<
T extends BaseConfig["modules"]["footerPanel"]
T extends BaseConfig["modules"]["footerPanel"],
> extends BaseView<T> {
$feedbackButton: JQuery;
$bookmarkButton: JQuery;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { isVisible } from "../../../../Utils";
import { BaseConfig } from "../../BaseConfig";

export class HeaderPanel<
T extends BaseConfig["modules"]["headerPanel"]
T extends BaseConfig["modules"]["headerPanel"],
> extends BaseView<T> {
$centerOptions: JQuery;
$helpButton: JQuery;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import { InformationAction } from "./InformationAction";

export class Information {
constructor(public message: string, public actions: InformationAction[]) {}
constructor(
public message: string,
public actions: InformationAction[]
) {}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import { InformationType } from "./InformationType";

export class InformationArgs {
constructor(public informationType: InformationType, public param: any) {}
constructor(
public informationType: InformationType,
public param: any
) {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { IIIFEvents } from "../../IIIFEvents";
import { BaseExpandPanel } from "./BaseExpandPanel";

export class LeftPanel<
T extends BaseConfig["modules"]["leftPanel"]
T extends BaseConfig["modules"]["leftPanel"],
> extends BaseExpandPanel<T> {
constructor($element: JQuery) {
super($element, false, false);
Expand Down