Skip to content

Commit

Permalink
Update inst/resources/gitbook/js/plugin-fontsettings.js
Browse files Browse the repository at this point in the history
Co-authored-by: Yihui Xie <[email protected]>
  • Loading branch information
hayden-MB and yihui authored Oct 25, 2024
1 parent f5f2e6f commit 457d4cd
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions inst/resources/gitbook/js/plugin-fontsettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,7 @@ gitbook.require(["gitbook", "lodash", "jQuery"], function(gitbook, _, $) {
}
var lineHeight = Math.max(fontState.spacing / 10, 1);
$book.find('section').css('line-height', lineHeight);

if (lineHeight <= 1) {
$(".font-settings .font-reduce").prop('disabled', true);
} else {
$(".font-settings .font-reduce").prop('disabled', false);
}
$(".font-settings .spacing-reduce").prop('disabled', lineHeight <= 1);
};

function init(config) {
Expand Down

0 comments on commit 457d4cd

Please sign in to comment.