Hi guys, I've got a similar problem, but slightly different. However
I'm implementing the timeline inside exhibit, and I'm using several JSON
datasets to keep the file size of each smaller, and more readable when
trying to fix. My problem is that I'd like to use the
ex:configuration="timelineConfig" to alter the timeline. You can see it
at http://designr.sheridanc.on.ca/projects.php I'm also gonna post the
script tag and the timeline template here.
var tl;
function onLoad() {
var eventSource = new Timeline.DefaultEventSource(0);
var theme = Timeline.ClassicTheme.create();
theme.event.bubble.width = 200;
theme.event.bubble.height = 200;
var d = Timeline.DateTime.parseGregorianDateTime("1900")
var bandInfos = [
Timeline.createBandInfo({
width: "60%",
intervalUnit: Timeline.DateTime.MONTH,
intervalPixels: 200,
eventSource: eventSource,
date: d,
theme: theme
}),
Timeline.createBandInfo({
width: "20%",
intervalUnit: Timeline.DateTime.YEAR,
intervalPixels: 300
}),
Timeline.createBandInfo({
width: "20%",
intervalUnit: Timeline.DateTime.DECADE,
intervalPixels: 400
})
];
bandInfos[1].syncWith = 0;
bandInfos[1].highlight = true;
bandInfos[2].syncWith = 0;
bandInfos[2].highlight = true;
tl = Timeline.create(document.getElementById("ex-tl"), bandInfos,
Timeline.HORIZONTAL);
eventSource.loadJSON(json_events, document.location.href);
window.alert(document.location.href);
}
var resizeTimerID = null;
function onResize() {
if (resizeTimerID == null) {
resizeTimerID = window.setTimeout(function() {
resizeTimerID = null;
tl.layout();
}, 500);
}
}
And the template:
<div id="ex-tl" ex:role="exhibit-view"
ex:viewClass="Exhibit.TimelineView"
ex:start=".date-original"
ex:marker=".type-discipline"
ex:bubbleWidth="250"
ex:bubbleHeight="200"
ex:configuration="timelineConfig">
<div ex:role="exhibit-lens" class="timeline-lens">
<img ex:src-content=".image-thumbnail" />
<div>
<span ex:content=".label"></span><br />
<span ex:content=".creator"></span><br />
<span ex:content=".type-discipline" class="discipline"></span>,
<span ex:content=".date-original"></span><br />
<a ex:href-content=".discussion" target="_blank">View more info and
discuss this project.</a>
</div>
</div>
</div>
I'm also calling the timeline with the "exhibit-api.js?views=timeline,"
does it make a difference if I do it that way or should I have a script
tag calling the timeline api directly? Thanks guys.
Cheers, +dk
Derek Kinsman
The Idea Company
New Media Designer
http://www.ideacompany.ca/
http://boring.ambitiouslemon.com/
http://nincompoopery.ambitiouslemon.com/
1 416 371 5652
_______________________________________________
General mailing list
[email protected]
http://simile.mit.edu/mailman/listinfo/general