Skip to content

Commit

Permalink
fixed #916
Browse files Browse the repository at this point in the history
  • Loading branch information
edsilv committed Nov 7, 2023
1 parent ca04992 commit 72ae729
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -259,10 +259,10 @@ export class ContentLeftPanel extends LeftPanel {
const range: Range = topRanges[i];
this.$treeSelect.append(
'<option value="' +
range.id +
'">' +
LanguageMap.getValue(range.getLabel()) +
"</option>"
range.id +
'">' +
LanguageMap.getValue(range.getLabel()) +
"</option>"
);
}
}
Expand Down Expand Up @@ -456,10 +456,8 @@ export class ContentLeftPanel extends LeftPanel {
// height = this.config.options.oneColThumbHeight;
// }

const thumbs: Thumb[] = <Thumb[]>(
this.extension.helper.getThumbs(90)
// this.extension.helper.getThumbs(width, height)
);
const thumbs: Thumb[] = <Thumb[]>this.extension.helper.getThumbs(90);
// this.extension.helper.getThumbs(width, height)

if (
viewingDirection &&
Expand Down Expand Up @@ -491,7 +489,9 @@ export class ContentLeftPanel extends LeftPanel {
}
}

const paged: boolean = (!!this.extension.getSettings().pagingEnabled && this.extension.helper.isPaged());
const paged: boolean =
!!this.extension.getSettings().pagingEnabled &&
this.extension.helper.isPaged();

const selectedIndices: number[] = this.extension.getPagedIndices(
this.extension.helper.canvasIndex
Expand Down Expand Up @@ -555,7 +555,7 @@ export class ContentLeftPanel extends LeftPanel {
return (
Bools.getBool(this.config.options.pageModeEnabled, true) &&
(<OpenSeadragonExtension>this.extension).getMode().toString() ===
Mode.page.toString()
Mode.page.toString()
);
}
return Bools.getBool(this.config.options.pageModeEnabled, true);
Expand Down Expand Up @@ -841,8 +841,8 @@ export class ContentLeftPanel extends LeftPanel {

this.$tabsContent.height(
this.$main.height() -
(isVisible(this.$tabs) ? this.$tabs.height() : 0) -
this.$tabsContent.verticalPadding()
(isVisible(this.$tabs) ? this.$tabs.height() : 0) -
this.$tabsContent.verticalPadding()
);
this.$views.height(
this.$tabsContent.height() - this.$options.outerHeight()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export class TreeView extends BaseView {
"treeNodeSelected",
function(node: TreeNode) {
that.extensionHost.publish(IIIFEvents.TREE_NODE_SELECTED, node);
this.resize(); // renders the tree component and highlights the selected element
},
false
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@
.treeView {
font-weight: normal;
overflow: auto;
padding: 0 @padding-medium-horizontal 0 0;

.iiif-tree-component ul li a.selected {
color: @brand-primary !important;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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);
}
Expand Down Expand Up @@ -1313,6 +1313,12 @@ export class OpenSeadragonCenterPanel extends CenterPanel {
this.extension.helper.getViewingDirection() ||
ViewingDirection.LEFT_TO_RIGHT;

if (this.extension.helper.isRightToLeft()) {
this.$title.addClass("rtl");
} else {
this.$title.removeClass("rtl");
}

if (
this.extension.helper.isMultiCanvas() &&
this.$prevButton &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
text-overflow: ellipsis;
line-height: 30px;

&.rtl {
direction: rtl;
}

.xl-mediaquery({
padding: 0 20px 0 20px;
});
Expand Down

0 comments on commit 72ae729

Please sign in to comment.