Skip to content

Commit 1ca6d10

Browse files
committed
Disable sync-icon movement when FULL_SIDEBAR is enabled
1 parent 783550e commit 1ca6d10

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

templates/html/navtree.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ function initNavTree(toroot,relpath) {
2828
const ARROW_DOWN = '<span class="arrowhead opened"></span>';
2929
const ARROW_RIGHT = '<span class="arrowhead closed"></span>';
3030
const NAVPATH_COOKIE_NAME = '$PROJECTID'+'navpath';
31+
const fullSidebar = typeof page_layout!=='undefined' && page_layout==1;
3132

3233
function getScrollBarWidth () {
3334
let outer = $('<div>').css({visibility: 'hidden', width: 100, overflow: 'scroll'}).appendTo('body');
@@ -40,9 +41,11 @@ function initNavTree(toroot,relpath) {
4041
const hasFadingScrollbars = !isSafari;
4142

4243
function adjustSyncIconPosition() {
43-
const nt = document.getElementById("nav-tree");
44-
const hasVerticalScrollbar = nt.scrollHeight > nt.clientHeight;
45-
$("#nav-sync").css({right:parseInt(hasVerticalScrollbar?scrollbarWidth:0)});
44+
if (!fullSidebar) {
45+
const nt = document.getElementById("nav-tree");
46+
const hasVerticalScrollbar = nt.scrollHeight > nt.clientHeight;
47+
$("#nav-sync").css({right:parseInt(hasVerticalScrollbar?scrollbarWidth:0)});
48+
}
4649
}
4750

4851
const getData = function(varName) {

0 commit comments

Comments
 (0)