Skip to content

Commit 683a08a

Browse files
committed
New: Now when applying Webtoon mode the vertical margin is 0
1 parent c00285d commit 683a08a

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

CHANGELOG.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
1010

1111
- Show error message if continue reading file does not exist [`7aee55c`](https://github.com/ollm/OpenComic/commit/7aee55ca5dac6b937824728b7ded116dc00c28df)
1212
- Support background music from folder: MP3, M4A, WEBM, WEBA, OGG, OPUS, WAV, FLAC [`26947a2`](https://github.com/ollm/OpenComic/commit/26947a297868e86069cc6daca77e1a3f016d0705)
13+
- Now when applying Webtoon mode the vertical margin is 0
1314

1415
##### 🐛 Bug Fixes
1516

1617
- node-zstd not have native dependencies in arm64 build (Linux and macOS) [`e906f21`](https://github.com/ollm/OpenComic/commit/e906f212dae36c43d514beda44fba62e5ca26be5)
1718
- Manga mode not working in epub [`a901754`](https://github.com/ollm/OpenComic/commit/a901754a4274687cddbfa3820ca3667b8b80e6ee)
1819
- eBook not working with decimal device pixel ratio (1.5, 2.5, etc) [`4962724`](https://github.com/ollm/OpenComic/commit/496272442747e466638e890a187f84b100deda14)
19-
- Blurry cover/poster images
20+
- Blurry cover/poster images [`23ae46d`](https://github.com/ollm/OpenComic/commit/23ae46d3d77847f5262f10799a21d7ee0141b226)
2021

2122
## [v1.1.0](https://github.com/ollm/OpenComic/releases/tag/v1.1.0) (13-01-2024)
2223

scripts/reading.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -2794,7 +2794,7 @@ function changePagesView(mode, value, save)
27942794

27952795
if(value)
27962796
{
2797-
template.globalElement('.pages-slide, .pages-scroll, .reading-reading-manga, .reading-double-page, .reading-do-not-apply-to-horizontals, .reading-blank-page, .reading-ajust-to-width, .reading-not-enlarge-more-than-original-size').addClass('disable-pointer');
2797+
template.globalElement('.pages-slide, .pages-scroll, .reading-reading-manga, .reading-double-page, .reading-do-not-apply-to-horizontals, .reading-blank-page, .reading-ajust-to-width, .reading-not-enlarge-more-than-original-size, .reading-margin-vertical').addClass('disable-pointer');
27982798
}
27992799
else
28002800
{
@@ -2804,7 +2804,7 @@ function changePagesView(mode, value, save)
28042804
if(_config.readingDoublePage)
28052805
template.globalElement('.reading-do-not-apply-to-horizontals, .reading-blank-page').removeClass('disable-pointer');
28062806

2807-
template.globalElement('.pages-slide, .pages-scroll, .reading-reading-manga, .reading-double-page, .reading-not-enlarge-more-than-original-size').removeClass('disable-pointer');
2807+
template.globalElement('.pages-slide, .pages-scroll, .reading-reading-manga, .reading-double-page, .reading-not-enlarge-more-than-original-size, .reading-margin-vertical').removeClass('disable-pointer');
28082808
}
28092809

28102810
template.loadContentRight('reading.content.right.html', true);
@@ -3673,8 +3673,8 @@ function readingMargin(data = false)
36733673
{
36743674
return {
36753675
margin: data && data.margin !== undefined ? data.margin : _config.readingMargin.margin,
3676-
top: data && data.top !== undefined ? data.top : _config.readingMargin.top,
3677-
bottom: data && data.bottom !== undefined ? data.bottom : _config.readingMargin.bottom,
3676+
top: _config.readingWebtoon ? 0 : (data && data.top !== undefined ? data.top : _config.readingMargin.top),
3677+
bottom: _config.readingWebtoon ? 0 : (data && data.bottom !== undefined ? data.bottom : _config.readingMargin.bottom),
36783678
left: data && data.left !== undefined ? data.left : _config.readingMargin.left,
36793679
right: data && data.right !== undefined ? data.right : _config.readingMargin.right,
36803680
};
@@ -3697,8 +3697,8 @@ function readingHorizontalsMargin(data = false)
36973697
{
36983698
return {
36993699
margin: data && data.horizontalsMargin !== undefined ? data.horizontalsMargin : _config.readingHorizontalsMargin.margin,
3700-
top: data && data.horizontalsTop !== undefined ? data.horizontalsTop : _config.readingHorizontalsMargin.top,
3701-
bottom: data && data.horizontalsBottom !== undefined ? data.horizontalsBottom : _config.readingHorizontalsMargin.bottom,
3700+
top: _config.readingWebtoon ? 0 : (data && data.horizontalsTop !== undefined ? data.horizontalsTop : _config.readingHorizontalsMargin.top),
3701+
bottom: _config.readingWebtoon ? 0 : (data && data.horizontalsBottom !== undefined ? data.horizontalsBottom : _config.readingHorizontalsMargin.bottom),
37023702
left: data && data.horizontalsLeft !== undefined ? data.horizontalsLeft : _config.readingHorizontalsMargin.left,
37033703
right: data && data.horizontalsRight !== undefined ? data.horizontalsRight : _config.readingHorizontalsMargin.right,
37043704
};

templates/reading.elements.menus.pages.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@
345345
<input type="range" max="{{config.readingMaxMargin}}" min="0" list="marginlist" value="{{_config.readingMargin.left}}" onrange="reading.changePagesView(10, \{{value}}, \{{toEnd}})">
346346
</div>
347347
</div>
348-
<div class="simple-slider gamepad-item" data-gamepad-left="events.rangeMoveStep(this, -1)" data-gamepad-right="events.rangeMoveStep(this, 1)">
348+
<div class="simple-slider gamepad-item reading-margin-vertical{{#if _config.readingWebtoon}} disable-pointer{{/if}}" data-gamepad-left="events.rangeMoveStep(this, -1)" data-gamepad-right="events.rangeMoveStep(this, 1)">
349349
<div class="simple-slider-text">{{language.reading.pages.marginVertical}}<div><i class="material-icon slider-reset" onclick="events.resetRange(this)" data-default="16">undo</i><span>{{_config.readingMargin.top}}</span>px</div></div>
350350
<div class="range">
351351
<div class="range-position">

0 commit comments

Comments
 (0)