Skip to content

Commit

Permalink
[thumbnails-orientation] Fix scrollbar position for layout: RTL Vertical
Browse files Browse the repository at this point in the history
  • Loading branch information
belozertsev committed Feb 13, 2025
1 parent 4eff3b4 commit 1f1965f
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions slide/Drawing/HtmlPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@
this.MouseHandObject = null;

this.m_oApi = api;
this.thumbnailsPosition = thumbnailsPositionMap.bottom; // left, right, bottom
this.thumbnailsPosition = thumbnailsPositionMap.right; // left, right, bottom
this.isRTL = true;
oThis = this;
}
Expand Down Expand Up @@ -694,7 +694,9 @@

this.m_oThumbnailsBack = CreateControl("id_thumbnails_background");
if (this.thumbnailsPosition === thumbnailsPositionMap.left || this.thumbnailsPosition === thumbnailsPositionMap.right) {
this.m_oThumbnailsBack.Bounds.SetParams(0, 0, scrollWidth, 1000, false, false, true, false, -1, -1);
this.isRTL
? this.m_oThumbnailsBack.Bounds.SetParams(scrollWidth, 0, 1000, 1000, true, false, false, false, -1, -1)
: this.m_oThumbnailsBack.Bounds.SetParams(0, 0, scrollWidth, 1000, false, false, true, false, -1, -1);
}
if (this.thumbnailsPosition === thumbnailsPositionMap.bottom) {
this.m_oThumbnailsBack.Bounds.SetParams(0, 0, 1000, scrollWidth, false, false, false, true, -1, -1);
Expand All @@ -704,7 +706,9 @@

this.m_oThumbnails = CreateControl("id_thumbnails");
if (this.thumbnailsPosition === thumbnailsPositionMap.left || this.thumbnailsPosition === thumbnailsPositionMap.right) {
this.m_oThumbnails.Bounds.SetParams(0, 0, scrollWidth, 1000, false, false, true, false, -1, -1);
this.isRTL
? this.m_oThumbnails.Bounds.SetParams(scrollWidth, 0, 1000, 1000, true, false, false, false, -1, -1)
: this.m_oThumbnails.Bounds.SetParams(0, 0, scrollWidth, 1000, false, false, true, false, -1, -1);
}
if (this.thumbnailsPosition === thumbnailsPositionMap.bottom) {
this.m_oThumbnails.Bounds.SetParams(0, 0, 1000, scrollWidth, false, false, false, true, -1, -1);
Expand All @@ -715,8 +719,13 @@
// НАДО ПЕРЕИМЕНОВАТЬ - ОН НЕ ВСЕГДА ВЕРТИКАЛЬНЫЙ ТЕПЕРЬ
this.m_oThumbnails_scroll = CreateControl("id_vertical_scroll_thmbnl");
if (this.thumbnailsPosition === thumbnailsPositionMap.left || this.thumbnailsPosition === thumbnailsPositionMap.right) {
this.m_oThumbnails_scroll.Bounds.SetParams(0, 0, 1000, 1000, false, false, false, false, scrollWidth, -1);
this.m_oThumbnails_scroll.Anchor = (g_anchor_top | g_anchor_right | g_anchor_bottom);
if (this.isRTL) {
this.m_oThumbnails_scroll.Bounds.SetParams(0, 0, scrollWidth, 1000, false, false, true, false, scrollWidth, -1);
this.m_oThumbnails_scroll.Anchor = (g_anchor_left | g_anchor_top | g_anchor_bottom);
} else {
this.m_oThumbnails_scroll.Bounds.SetParams(0, 0, 1000, 1000, false, false, false, false, scrollWidth, -1);
this.m_oThumbnails_scroll.Anchor = (g_anchor_top | g_anchor_right | g_anchor_bottom);
}
}
if (this.thumbnailsPosition === thumbnailsPositionMap.bottom) {
this.m_oThumbnails_scroll.Bounds.SetParams(0, 0, 1000, 1000, false, false, false, false, -1, scrollWidth);
Expand Down

0 comments on commit 1f1965f

Please sign in to comment.