(I wasn't able to directly reply to the thread noted above. Do they
become stale after a certain time?)
Anyway, sounds like a couple of other people were looking for the same
thing I was. That is, to highlight, in some way, the region of an
Exhibit Timeline band representing today. (In my case the band has
intervalUnit: Timeline.DateTime.DAY)
I found a pretty straightforward way to do it that seems to be
working. Probably more elegant ways to do it (and it doesn't yet
account for timezones) but I solved it by including this code in the
myTimelineConstructor function:
todaysDateBegin = new Date();
todaysDateBegin.setHours(00);
todaysDateBegin.setMinutes(00);
todaysDateBegin.setSeconds(00);
todaysDateEnd = new Date();
todaysDateEnd.setHours(23);
todaysDateEnd.setMinutes(59);
todaysDateEnd.setSeconds(59);
for (var i = 0; i < bandInfos.length; i++) {
bandInfos[i].decorators = [
new Timeline.SpanHighlightDecorator({
startDate: new Date(todaysDateBegin),
endDate: new Date(todaysDateEnd),
color: "#FFC080", // set color explicitly
opacity: 50,
startLabel: "BEGIN TODAY",
endLabel: "END TODAY",
theme: theme
})
];
}
HTH,
-Mark
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"SIMILE Widgets" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/simile-widgets?hl=en
-~----------~----~----~----~------~----~------~--~---