ProjectMirador / research-and-demos

Proofs of concept for Mirador 3
10 stars 8 forks source link

[WIP] prototype a keyboard shortcuts plugin #91

Open aeschylus opened 5 years ago

aeschylus commented 5 years ago

This represents some discussion about possible plugin architectures and initialisation methods. Not to be merged.

christopher-johnson commented 5 years ago

For example, what about something like this?

var myMirador = new MiradorViewer(config);
myMirador.registerPlugins([keyboardPlugin, rulerPlugin]);

This looks like a God Object.

Fusion.js might be interesting if you want to consider a DI based plugin architecture.

Docs on how to create a plugin: https://fusionjs.com/docs/guides/creating-a-plugin

This describes it: https://eng.uber.com/fusionjs/