mirror of
https://github.com/Kareadita/Kavita.git
synced 2025-07-09 03:04:19 -04:00
On desktop devices, when reading with fit to width or original, next page would't reset scroll position. (#535)
This commit is contained in:
parent
8b82829161
commit
61220a02a1
@ -8,7 +8,7 @@ namespace API.Benchmark
|
|||||||
/// then copy the outputted dll
|
/// then copy the outputted dll
|
||||||
/// dotnet copied_string\API.Benchmark.dll
|
/// dotnet copied_string\API.Benchmark.dll
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class Program
|
public static class Program
|
||||||
{
|
{
|
||||||
static void Main(string[] args)
|
static void Main(string[] args)
|
||||||
{
|
{
|
||||||
|
@ -482,11 +482,7 @@ export class MangaReaderComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getFittingIcon() {
|
getFittingIcon() {
|
||||||
let value = FITTING_OPTION.HEIGHT;
|
const value = this.getFit();
|
||||||
const formControl = this.generalSettingsForm.get('fittingOption');
|
|
||||||
if (formControl !== undefined) {
|
|
||||||
value = formControl?.value;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch(value) {
|
switch(value) {
|
||||||
case FITTING_OPTION.HEIGHT:
|
case FITTING_OPTION.HEIGHT:
|
||||||
@ -498,6 +494,15 @@ export class MangaReaderComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getFit() {
|
||||||
|
let value = FITTING_OPTION.HEIGHT;
|
||||||
|
const formControl = this.generalSettingsForm.get('fittingOption');
|
||||||
|
if (formControl !== undefined) {
|
||||||
|
value = formControl?.value;
|
||||||
|
}
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
cancelMenuCloseTimer() {
|
cancelMenuCloseTimer() {
|
||||||
if (this.menuTimeout) {
|
if (this.menuTimeout) {
|
||||||
clearTimeout(this.menuTimeout);
|
clearTimeout(this.menuTimeout);
|
||||||
@ -735,6 +740,11 @@ export class MangaReaderComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
} else {
|
} else {
|
||||||
this.ctx.drawImage(this.canvasImage, 0, 0);
|
this.ctx.drawImage(this.canvasImage, 0, 0);
|
||||||
}
|
}
|
||||||
|
// Reset scroll on non HEIGHT Fits
|
||||||
|
if (this.getFit() !== FITTING_OPTION.HEIGHT) {
|
||||||
|
window.scrollTo(0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
this.isLoading = false;
|
this.isLoading = false;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user