Comments (3)
I passed on this in the first draft as every facet would need to implement it a little differently depending on its nature. Some knowledge of usage of this event would help in forming what it would pass on, etc. Should it merely signal that something changed? Also put out what selection was chosen? Un-chosen? Added? Which text was written in the text search - so far, or after a reasonable pause in typing? Or just the actual facet instance so the rest can be determined programmatically by interrogating the object?
from exhibit3.
I'm not convinced that we have so many different kinds of facets. We have several enumerated types, where the obvious thing is to report the list of selected values, and we have some range types, where it is reasonable to report upper and lower limits of the selection.
Passing the facet instance does seem to be a reasonable backup; it at least allows anyone who cares to do something about it.
Related question: should such facet change events be used to notify views (and other facets) that they should update? Is that already how it's implemented?
from exhibit3.
Facets directly notify collections of changes through the collection API and duck typing, and the collection then informs all components in its purview of the changes. This might be better replaced by a mirror Event API, but I won't have time to look into that for this revision.
I was talking about code reuse. It doesn't really matter how similar some are in the abstract; that doesn't reduce the amount of code that needs to be written, though some of it is going to look similar.
Those questions are getting at what you want from an event: a delta or the current state. Unless your own listening code is recording a history of each state, you won't know exactly what changed if it's just the facet object that gets passed along. Though it should probably get passed along regardless. So how are you intending to use this event?
from exhibit3.
Related Issues (20)
- Feature Request: Enable Map MarkerClusterer HOT 1
- script injection attack HOT 1
- $(document).one() in event registration precludes reinitialization HOT 2
- Exhibit history mechanism inappropriately clears query portion of url
- Reconsider use of jquery().data() methd HOT 4
- History breaks in IE9 HOT 15
- Toolbox button placement is incorrect
- Broken in IE9 HOT 1
- autoposition
- Restore original license and copyright notice HOT 3
- Multi-Term-Query for Text Search Facet HOT 2
- dist demos use wrong path HOT 1
- Edge case for lens template processing in Google Map view HOT 8
- Clarify roles of Debug.exception and Debug.warn
- Lens template rendering bug HOT 1
- Auto-size bubbles
- Restore ex:converter-type functionality to exhibit3 HOT 1
- Replace deprecated jQuery methods
- Does data data-ex-collectionID works? HOT 2
- Inconsistent use of history leads to redundant rendering HOT 1
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 exhibit3.