Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor pub/sub to localize events #921

Merged
merged 6 commits into from May 12, 2016
Merged

Refactor pub/sub to localize events #921

merged 6 commits into from May 12, 2016

Conversation

arthurian
Copy link
Contributor

This PR refactors the event system in Mirador so that instead of publishing/subscribing to the global jQuery object, events are published/subscribed to an instance of Mirador.EventEmitter that belongs to Mirador. This is a first step to making it possible to have multiple instances of Mirador on the page (i.e. #904).

This PR touches quite a few source files in the release2.1 branch:

$ egrep -r 'jQuery\.(publish|subscribe|unsubscribe)' ./js/src | cut -d ":" -f1 | sort | uniq
./js/src/annotations/annotationTooltip.js
./js/src/annotations/catchEndpoint.js
./js/src/annotations/osd-region-draw-tool.js
./js/src/annotations/osd-svg-overlay.js
./js/src/utils/saveController.js
./js/src/viewer.js
./js/src/viewer/bookmarkPanel.js
./js/src/viewer/mainMenu.js
./js/src/viewer/manifestList.js
./js/src/viewer/manifestListItem.js
./js/src/viewer/manifestLoadStatusIndicator.js
./js/src/viewer/manifestsPanel.js
./js/src/viewer/workspacePanel.js
./js/src/widgets/annotationsLayer.js
./js/src/widgets/annotationsTab.js
./js/src/widgets/bookView.js
./js/src/widgets/contextControls.js
./js/src/widgets/hud.js
./js/src/widgets/imageView.js
./js/src/widgets/layersTab.js
./js/src/widgets/sidePanel.js
./js/src/widgets/tabs.js
./js/src/widgets/thumbnailsView.js
./js/src/widgets/toc.js
./js/src/workspace.js
./js/src/workspaces/slot.js
./js/src/workspaces/window.js

@rsinghal @aeschylus Not sure if you guys already started this on your own or not, so I figured I'd finish what I started last week and throw this up here for you to take a look at.

@rsinghal
Copy link
Collaborator

This looks good to me. @aeschylus did you start something like this already, or can we merge?

@rsinghal rsinghal merged commit f401c6f into ProjectMirador:release2.1 May 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants