-
Notifications
You must be signed in to change notification settings - Fork 81
Open
Description
The current code includes the following:
if (this.timeFacets[facet].eventsData[item]._id == this.selectedItemId) {
this.timeFacets[facet].eventsData[item]._icon = "scripts/timeline_js/images/dark-red-circle.png";
} else
this.timeFacets[facet].eventsData[item]._icon = "scripts/timeline_js/images/blue-circle.png";As I discovered, for someone developing on Windows and who doesn't have the source in the scripts directory, this code will result in missing images. Rather than force the source to be in the scripts folder, a more elegant solution is to do as the timeline_js code does and use the Timeline.url_prefix variable, which results in the following code:
if (this.timeFacets[facet].eventsData[item]._id == this.selectedItemId) {
this.timeFacets[facet].eventsData[item]._icon = Timeline.urlPrefix + "images/dark-red-circle.png";
} else
this.timeFacets[facet].eventsData[item]._icon = Timeline.urlPrefix + "images/dull-blue-circle.png";(Note that I changed the image to dull-blue-circle to match the image used initially by timeline_js.)
Metadata
Metadata
Assignees
Labels
No labels