Move the cursorToolOnLoad preference handling into AppOptions (PR 9493 follow-up)

Since no other viewer component is currently reading preferences itself, this patch thus unifies the behaviour across the viewer.
This commit is contained in:
Jonas Jenwald 2018-03-19 23:24:56 +01:00
parent 6db9c3cb49
commit c2f1523f06
3 changed files with 16 additions and 7 deletions

View file

@ -179,6 +179,9 @@ let PDFViewerApplication = {
preferences.get('sidebarViewOnLoad').then(function resolved(value) {
AppOptions.set('sidebarViewOnLoad', value);
}),
preferences.get('cursorToolOnLoad').then(function resolved(value) {
AppOptions.set('cursorToolOnLoad', value);
}),
preferences.get('pdfBugEnabled').then(function resolved(value) {
AppOptions.set('pdfBugEnabled', value);
}),
@ -434,7 +437,7 @@ let PDFViewerApplication = {
this.pdfCursorTools = new PDFCursorTools({
container,
eventBus,
preferences: this.preferences,
cursorToolOnLoad: AppOptions.get('cursorToolOnLoad'),
});
this.toolbar = new Toolbar(appConfig.toolbar, container, eventBus,