Comments (4)
We could do something similar to OSD and structure our events like this:
var events = {
'NS1' : {
'handlers' : [NS1handler1, NS1handler2],
'events' : {
'event1' : [eventhandler1, eventhandler2],
'event2' : []
}
},
'NS2' : {
'handlers' : [NS2handler1, NS2handler2],
'events' : {
'event3' : [],
'event4' : []
}
}
}
Which allows us to handle events for an entire namespace.
And you can raise events like 'NS1:event2'.
from mirador.
Here is the article on which I based the annotation layer event system, after reading this little library, and the backbone events source code. And then there's the jQuery "custom" events, that, in theory, can use namespacing on objects
from mirador.
I like the tiny pub/sub you link to since it includes the namespacing we want. I'm happy to go with that. I think it'll nicely address our issues.
from mirador.
Okay. I pushed what I have for the workspaces this morning. I don't think
it will be especially helpful, as it represents several false starts. It
also have come to accept that a great deal on what we do with the event
mixin, as the workspaces and windows should be propagated from changes in
their parent models anyway. I think the pubSub plugin will work for us, we
just need to come up with a way to mix it in with a getter and setter
pattern à la issue #3 #3, so that that
behaviour can be "baked in", so to speak, for objects that need it. I am
finding it counterproductive to continue on this without doing a bad
first-pass, in order to then pick out the pieces that are abstractable and
generalise them. The workspaces idea is probably the most complicated place
to do that "make a first concrete example, then generalise" approach, so I
wonder if we could pair today on the Load Menu (which doesn't rely on any
of the workspace code until it needs to place something there), which seems
more straightforward as a first concrete application of the event system
code. Hopefully the outcome of that will be a finished mixin with an
established pattern for us to use for interface objects by the end of today.
On 6 May 2014 12:57, rsinghal [email protected] wrote:
I like the tiny pub/sub you link to since it includes the namespacing we
want. I'm happy to go with that. I think it'll nicely address our issues.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/9#issuecomment-42350926
.
from mirador.
Related Issues (20)
- Window navigation controls sometimes overlaps canvas
- GET images using authorization token HOT 2
- OSD v4.1.0 handling (impacts to M4, serverless) HOT 1
- Go directly to an image in a collection
- Error on choice in body of annotation
- Origin parameter should be parsed with query string library
- Window dropdown for plugins not keyboard navigable
- Redundant title read by screen reader
- New UI/UX report to review - UI/UX of Mirador in Mmmonk HOT 1
- Accessibility: indicate which thumbnail is selected, for screenreaders
- Mmmonk feedback: remove "__test__/integration" from demo URLs
- Mmmonk feedback: remove "-dev" from Netlify demo URL HOT 2
- Mmmonk feedback: Improve word choice for import/export flow
- WCAG Failure: Color contrast of thumbnail text on thumbnail is too low
- WCAG Failure: Selecting the Information, Copyrights, or Index Tabs screen reader focus is sent to the top of the page.
- WCAG Failure: The html language identifier is missing in the language option drop down menu
- WCAG Failure: When selecting the thumbnail or next page, focus does not move to the top of the new pages
- Tiled image loading when using AWS Origin Access Control (OAC) with Cloudfront HOT 1
- Annotation borders are too thick
- Images from Harvard manifest in the Mirador demo are not working, service answers with AWS WAF challenge header HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mirador.