Commit 36077d81 authored by Robert Knight's avatar Robert Knight

Remove obsolete plugin configuration

The empty objects in the default config only exist to ensure that the
corresponding plugin is initialized in the `Guest` constructor.

Some of these are obsolete:

 - There is no longer a `TextSelection` plugin

 - There is no longer a `Toolbar` plugin

 - The `Document` plugin only needs to be initialized in the `Guest`
   base class
parent add1b4e9
......@@ -67,11 +67,9 @@ const IGNORE_SELECTOR = '[class^="annotator-"],[class^="hypothesis-"]';
export default class Guest extends Delegator {
constructor(element, config, anchoring = htmlAnchoring) {
// TODO - Find out if `defaultConfig` actually does anything and remove it
// if not.
const defaultConfig = {
// This causes the `Document` plugin to be initialized.
Document: {},
TextSelection: {},
};
super(element, { ...defaultConfig, ...config });
......
......@@ -6,15 +6,11 @@ import Sidebar from './sidebar';
*/
const defaultConfig = {
TextSelection: {},
PDF: {},
BucketBar: {
container: '.annotator-frame',
scrollables: ['#viewerContainer'],
},
Toolbar: {
container: '.annotator-frame',
},
};
// The viewport and controls for PDF.js start breaking down below about 670px
......
......@@ -19,8 +19,6 @@ import { ToolbarController } from './toolbar';
const MIN_RESIZE = 280;
const defaultConfig = {
Document: {},
TextSelection: {},
BucketBar: {
container: '.annotator-frame',
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment