Skip to content

Commit

Permalink
PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
encimita committed Nov 28, 2024
1 parent 7fd84cb commit a18e3f9
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ var _showFilters = false;
var _showPageSelection = false;
var _showZoomBar = true;
var _forceTransparentBackground = false;
var _forceFitToPage = false;
var _addBottomPadding = false;
var _localeSettings = {};

Expand Down Expand Up @@ -154,6 +155,7 @@ function SetSettings(showBookmarkSelection, showFilters, showPageSelection, show
_showZoomBar = showZoomBar;
_forceTransparentBackground = forceTransparentBackground;
_addBottomPadding = addBottomPadding;
_forceFitToPage = forceFitToPage;
}

// Exposed Functions
Expand Down Expand Up @@ -430,6 +432,13 @@ function CompileSettings() {
settingsObject.background = models.BackgroundType.Transparent;
}

if (_forceFitToPage) {
settingsObject.layoutType = models.LayoutType.Custom;
settingsObject.customLayout = {
displayOption: models.DisplayOption.FitToPage
}
}

return settingsObject;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ var _showFilters = false;
var _showPageSelection = false;
var _showZoomBar = true;
var _forceTransparentBackground = false;
var _forceFitToPage = false;
var _addBottomPadding = false;
var _localeSettings = {};

Expand Down Expand Up @@ -154,6 +155,7 @@ function SetSettings(showBookmarkSelection, showFilters, showPageSelection, show
_showZoomBar = showZoomBar;
_forceTransparentBackground = forceTransparentBackground;
_addBottomPadding = addBottomPadding;
_forceFitToPage = forceFitToPage;
}

// Exposed Functions
Expand Down Expand Up @@ -430,6 +432,13 @@ function CompileSettings() {
settingsObject.background = models.BackgroundType.Transparent;
}

if (_forceFitToPage) {
settingsObject.layoutType = models.LayoutType.Custom;
settingsObject.customLayout = {
displayOption: models.DisplayOption.FitToPage
}
}

return settingsObject;
}

Expand Down

0 comments on commit a18e3f9

Please sign in to comment.