From 2ec912c262b51fe9523ebf74d5062d0b9bbdab71 Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Tue, 14 May 2019 20:28:22 +0900 Subject: Mark keys as a clean archtecture --- src/content/controllers/MarkController.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/content/controllers/MarkController.ts (limited to 'src/content/controllers/MarkController.ts') diff --git a/src/content/controllers/MarkController.ts b/src/content/controllers/MarkController.ts new file mode 100644 index 0000000..365794c --- /dev/null +++ b/src/content/controllers/MarkController.ts @@ -0,0 +1,16 @@ +import * as messages from '../../shared/messages'; +import MarkUseCase from '../usecases/MarkUseCase'; + +export default class MarkController { + private markUseCase: MarkUseCase; + + constructor({ + markUseCase = new MarkUseCase(), + } = {}) { + this.markUseCase = markUseCase; + } + + scrollTo(message: messages.TabScrollToMessage) { + this.markUseCase.scroll(message.x, message.y); + } +} -- cgit v1.2.3