Charles,
If you must, then here's how (I haven't tested it myself):
1. Make a copy of this file and then include your copy after you include
exhibit-api.js:
http://static.simile.mit.edu/exhibit/api/scripts/views/timeline-view.js
2. In your copy of that file, find
var makeGetDurations = function(s) {
...
};
and change it to
var makeGetDurations = function(s) {
var expr = Exhibit.Expression.parse(s);
return function(itemID, database) {
var pairs = [];
expr.evaluate(
{ "value" : itemID },
{ "value" : "item" },
"value",
database
).values.visit(function(v) {
var startEnd = getStartEnd(v, database);
if (startEnd.start != null) {
startEnd.proxy = v;
pairs.push(startEnd);
}
});
return pairs;
};
};
Basically, add: startEnd.proxy = v; inside the if statement.
3. In that same file, find
var addEvent = function(itemID, duration, markerData) {
...
}
and add this line as the first statement inside that function:
if ("proxy" in duration) itemID = duration.proxy;
Hope that works,
David
Charles Cowan wrote:
> David:
>
> Thank you so much for your prompt response (you certainly are busy
> and responsive!). I even tried using 'ex:itemTypes = "Milestone"'
> (which works on lenses) on the timeline view in the hopes of switching
> to a root of Milestone (also, see below with regard to the timeline
> constructor, I also tried a call to
> 'myExhibit.setRootTypes("Project");' after instantiating a "myExhibit
> variable" but that just confused Exhibit). I can live with the
> situation (I'll take the bars labeled with the "project) but:
>
> >In your problem 2, the timeline still thinks it's plotting projects (not
> >milestones). So if you click on any bar in the timeline, the lens that
> >shows up renders the project, not the milestone. So all the expressions
> >are relative to the projects.
>
>
> Given that situation, is there any way, in the lens, to tell which
> of the milestones (my assumption here is some sort of set represents
> that collection of milestones - they show up nicely when referring to
> the collection, I just need to know which one is currently being
> processed) is currently being rendered? I can't quite figure out the
> correct expression given the project as a base. Can you give some
> definition of the "index" path element (I suspect this is what I need
> - the "index" of the particular milestone being processed)?
>
> Also, I'm already using the trick of including (and have working)
> the timelineConfig/timelineConstructor to setup the timeline, so I
> would not be adverse to including another <script> </script> section
> if you can recommend some javascript to override a function or two to
> get me closer to my goal.
>
> Thanks again.
>
> Charles
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> General mailing list
> [email protected]
> http://simile.mit.edu/mailman/listinfo/general
>
_______________________________________________
General mailing list
[email protected]
http://simile.mit.edu/mailman/listinfo/general