diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2019-05-11 11:51:29 +0900 |
---|---|---|
committer | Shin'ya Ueoka <ueokande@i-beam.org> | 2019-05-11 11:51:29 +0900 |
commit | ad1f3c07fbb90c4e69cc2374d74a7373e4da70f2 (patch) | |
tree | ae73b962860b334a760137a557dfa9b3c0cd285c /src/content/components/top-content | |
parent | 1ba1660269b24446e9df7df0016de8c3e5596c8f (diff) |
Make scroller as a presenter
Diffstat (limited to 'src/content/components/top-content')
-rw-r--r-- | src/content/components/top-content/index.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/content/components/top-content/index.ts b/src/content/components/top-content/index.ts index b9ef2dd..de14b3f 100644 --- a/src/content/components/top-content/index.ts +++ b/src/content/components/top-content/index.ts @@ -4,10 +4,11 @@ import FindComponent from './find'; import * as consoleFrames from '../../console-frames'; import * as messages from '../../../shared/messages'; import MessageListener from '../../MessageListener'; -import * as scrolls from '../../scrolls'; import AddonEnabledUseCase from '../../usecases/AddonEnabledUseCase'; +import { ScrollPresenterImpl } from '../../presenters/ScrollPresenter'; let addonEnabledUseCase = new AddonEnabledUseCase(); +let scrollPresenter = new ScrollPresenterImpl(); export default class TopContent { private win: Window; @@ -42,7 +43,7 @@ export default class TopContent { case messages.ADDON_ENABLED_QUERY: return Promise.resolve(addonEnabled); case messages.TAB_SCROLL_TO: - return scrolls.scrollTo(message.x, message.y, false); + return scrollPresenter.scrollTo(message.x, message.y, false); } } } |