aboutsummaryrefslogtreecommitdiff
path: root/src/content/usecases/MarkUseCase.ts
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2019-05-14 20:28:22 +0900
committerShin'ya Ueoka <ueokande@i-beam.org>2019-05-18 21:25:18 +0900
commit2ec912c262b51fe9523ebf74d5062d0b9bbdab71 (patch)
treebbda7eef0730cd1bff7b88850fbe3327e7d4f4e3 /src/content/usecases/MarkUseCase.ts
parentefc48dc7421e3bd48534bc94f84e2b0bd47ae47c (diff)
Mark keys as a clean archtecture
Diffstat (limited to 'src/content/usecases/MarkUseCase.ts')
-rw-r--r--src/content/usecases/MarkUseCase.ts8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/content/usecases/MarkUseCase.ts b/src/content/usecases/MarkUseCase.ts
index ec63f2b..530f141 100644
--- a/src/content/usecases/MarkUseCase.ts
+++ b/src/content/usecases/MarkUseCase.ts
@@ -51,11 +51,15 @@ export default class MarkUseCase {
if (!pos) {
throw new Error('Mark is not set');
}
- let smooth = this.settingRepository.get().properties.smoothscroll;
- this.scrollPresenter.scrollTo(pos.x, pos.y, smooth);
+ this.scroll(pos.x, pos.y);
}
}
+ scroll(x: number, y: number): void {
+ let smooth = this.settingRepository.get().properties.smoothscroll;
+ this.scrollPresenter.scrollTo(x, y, smooth);
+ }
+
private globalKey(key: string) {
return (/^[A-Z0-9]$/).test(key);
}