diff --git a/src/content-handlers/iiif/modules/uv-contentleftpanel-module/TreeView.ts b/src/content-handlers/iiif/modules/uv-contentleftpanel-module/TreeView.ts index 04e976b77..9d99c08b4 100644 --- a/src/content-handlers/iiif/modules/uv-contentleftpanel-module/TreeView.ts +++ b/src/content-handlers/iiif/modules/uv-contentleftpanel-module/TreeView.ts @@ -18,7 +18,7 @@ export class TreeView extends BaseView { this.setConfig("contentLeftPanel"); super.create(); - this.$tree = $('
'); + this.$tree = $('
'); this.$element.append(this.$tree); } diff --git a/src/content-handlers/iiif/modules/uv-contentleftpanel-module/css/styles.less b/src/content-handlers/iiif/modules/uv-contentleftpanel-module/css/styles.less index efd92f7be..19fcd0cc6 100644 --- a/src/content-handlers/iiif/modules/uv-contentleftpanel-module/css/styles.less +++ b/src/content-handlers/iiif/modules/uv-contentleftpanel-module/css/styles.less @@ -115,6 +115,11 @@ font-weight: normal; overflow: auto; + .iiif-tree-component.rtl { + direction: rtl; + padding-right: @padding-medium-horizontal; + } + .iiif-tree-component ul li a.selected { color: @brand-primary !important; } diff --git a/src/content-handlers/iiif/modules/uv-openseadragoncenterpanel-module/OpenSeadragonCenterPanel.ts b/src/content-handlers/iiif/modules/uv-openseadragoncenterpanel-module/OpenSeadragonCenterPanel.ts index cb19f76eb..1777bd225 100644 --- a/src/content-handlers/iiif/modules/uv-openseadragoncenterpanel-module/OpenSeadragonCenterPanel.ts +++ b/src/content-handlers/iiif/modules/uv-openseadragoncenterpanel-module/OpenSeadragonCenterPanel.ts @@ -594,7 +594,7 @@ export class OpenSeadragonCenterPanel extends CenterPanel { maxLevel: info.levels - 1, units: "mm", spacing: [info.mm_x, info.mm_y], - getTileUrl: function (level, x, y, query) { + getTileUrl: function(level, x, y, query) { var url = tileDescriptor + "/zxy/" + level + "/" + x + "/" + y; if (query) { @@ -947,9 +947,9 @@ export class OpenSeadragonCenterPanel extends CenterPanel { const canvas: Canvas = this.extension.helper.getCurrentCanvas(); const dimensions: CroppedImageDimensions | null = (this .extension as OpenSeadragonExtension).getCroppedImageDimensions( - canvas, - this.viewer - ); + canvas, + this.viewer + ); if (dimensions) { const bounds: XYWHFragment = new XYWHFragment( @@ -985,7 +985,7 @@ export class OpenSeadragonCenterPanel extends CenterPanel { if (!center) return; // postpone pan for a millisecond - fixes iPad image stretching/squashing issue. - setTimeout(function () { + setTimeout(function() { viewer.viewport.panTo(center, true); }, 1); } @@ -1296,10 +1296,6 @@ export class OpenSeadragonCenterPanel extends CenterPanel { if (!this.isCreated) return; - if (this.title) { - this.$title.text(sanitize(this.title)); - } - this.$spinner.css( "top", this.$content.height() / 2 - this.$spinner.height() / 2 @@ -1313,6 +1309,17 @@ export class OpenSeadragonCenterPanel extends CenterPanel { this.extension.helper.getViewingDirection() || ViewingDirection.LEFT_TO_RIGHT; + if (this.title) { + this.$title.text(sanitize(this.title)); + } + + // if the manifest has a right-to-left viewing direction, add a class to the title to display it rtl + if (this.extension.helper.isRightToLeft()) { + this.$title.addClass("rtl"); + } else { + this.$title.removeClass("rtl"); + } + if ( this.extension.helper.isMultiCanvas() && this.$prevButton && diff --git a/src/content-handlers/iiif/modules/uv-shared-module/css/center-panel.less b/src/content-handlers/iiif/modules/uv-shared-module/css/center-panel.less index e18254bf2..2167ea519 100644 --- a/src/content-handlers/iiif/modules/uv-shared-module/css/center-panel.less +++ b/src/content-handlers/iiif/modules/uv-shared-module/css/center-panel.less @@ -12,6 +12,10 @@ text-overflow: ellipsis; line-height: 30px; + &.rtl { + direction: rtl; + } + .xl-mediaquery({ padding: 0 20px 0 20px; });