Skip to content

Commit 40fe0d9

Browse files
committed
sidebar fix
1 parent 8565cf3 commit 40fe0d9

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

public/javascripts/DV/helpers/construction.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,9 @@ DV._.extend(DV.Schema.helpers, {
6868

6969
if (options.responsive) {
7070
var container = DV.jQuery(options.container);
71-
this.viewer.options.sidebarVisible = (container.width() - 2) >= this.viewer.helpers.RESPONSIVE_MIN_SIDEBAR_WIDTH;
71+
if (this.viewer.options.sidebar !== false) {
72+
this.viewer.options.sidebarVisible = (container.width() - 2) >= this.viewer.helpers.RESPONSIVE_MIN_SIDEBAR_WIDTH;
73+
}
7274
container.css({
7375
position: 'relative',
7476
height: options.height

public/javascripts/DV/helpers/helpers.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,9 @@ DV.Schema.helpers = {
523523
responsiveRedraw: function() {
524524
var width = this.viewer.elements.viewer.width();
525525
if (width != this._prevWidth) {
526-
this.viewer.options.sidebarVisible = width >= this.viewer.helpers.RESPONSIVE_MIN_SIDEBAR_WIDTH;
526+
if (this.viewer.options.sidebar !== false) {
527+
this.viewer.options.sidebarVisible = width >= this.viewer.helpers.RESPONSIVE_MIN_SIDEBAR_WIDTH;
528+
}
527529
this.viewer.api.redraw(true);
528530
this._prevWidth = width;
529531
}

0 commit comments

Comments
 (0)