Hi Everyone,
Just started using Timeline and having a problem I just can't find
information about.
I am trying to add events manually that the user selects and display
them dynamically, not sure I got the grasp of everything.
I get the following error in Chrome's Developer Tools:
Uncaught TypeError: Object #<Object> has no method 'getTime'
bundle.js:4492
Here is the code I have:
//Basic Init
var tl;
var eventSource;
function onLoad()
{
eventSource = new Timeline.DefaultEventSource();
var bandInfos = [
Timeline.createBandInfo({
width: "70%",
eventSource: eventSource,
intervalUnit: Timeline.DateTime.MONTH,
intervalPixels: 100,
}),
Timeline.createBandInfo({
eventSource: eventSource,
width: "30%",
intervalUnit: Timeline.DateTime.YEAR,
intervalPixels: 200,
})
];
bandInfos[1].syncWith = 0;
bandInfos[1].highlight = true;
tl = Timeline.create(document.getElementById("breakpoint-timeline"),
bandInfos);
}
var resizeTimerID = null;
function onResize() {
if (resizeTimerID == null) {
resizeTimerID = window.setTimeout(function() {
resizeTimerID = null;
tl.layout();
}, 500);
}
}
//Add Event
function addBreakpoint()
{
var date = document.getElementById("eventDatepicker").value;
var evt = new Timeline.DefaultEventSource.Event ({
start: "Aug 03 2011 00:00:00 GMT-0600", //Hardcoded for the time
being using Timeline default date
instant : true,
text : "An event",
description : "A description",
});
eventSource.add(evt);
tl.paint();
}
Thanks in advance for any help you can provide!
--
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.