Hi David. What I'm trying to do is "have total control of the timeline
( http://simile.mit.edu/wiki/Exhibit/Timeline_View )." However when I
do it the way the wiki instructs it doesn't work (most likely cause of
me). I'm not sure what I'm doing wrong. I assumed it should look like
this:
var timelineConfig = {
timelineConstructor:
function (div, eventSource) {
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: "40%",
intervalUnit: Timeline.DateTime.YEAR,
intervalPixels: 200,
eventSource: eventSource,
date: d,
theme: theme
})
];
bandInfos[1].syncWith = 0;
bandInfos[1].highlight = true;
bandInfos[2].syncWith = 0;
bandInfos[2].highlight = true;
return tl;
}
}
I know the function (div, eventSource) are still blank, but I'm not to
sure how properly write them into it. I'm assuming the div would be
replaced with document.getElementById("ex-tl") or just the div id. But
I have no idea about the eventSource. I know I'm probably a pain right
now. Your help is very much appreciated. Thanks.
Derek Kinsman
The Idea Company
New Media Designer
http://www.ideacompany.ca/
http://boring.ambitiouslemon.com/
http://nincompoopery.ambitiouslemon.com/
1 416 371 5652
David Huynh wrote:
> Hi Derek, I am not sure I understand what the problem is in your case...
> But your onLoad function is never hooked up to anything so it will never
> get run. You can remove it. Your timeline seems functional to me.
>
> David
>
> derek | idea company wrote:
>
>> 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
>>
>>
>
> _______________________________________________
> General mailing list
> [email protected]
> http://simile.mit.edu/mailman/listinfo/general
>
>
_______________________________________________
General mailing list
[email protected]
http://simile.mit.edu/mailman/listinfo/general