Romain,
That seems to be a bug in Timeline. You could fix it by including this
code after you include timeline-api.js:
Timeline.GregorianEtherPainter.prototype.paint = function() {
if (this._markerLayer) {
this._band.removeLayerDiv(this._markerLayer);
}
this._markerLayer = this._band.createLayerDiv(100);
this._markerLayer.setAttribute("name", "ether-markers"); // for debugging
this._markerLayer.style.display = "none";
if (this._lineLayer) {
this._band.removeLayerDiv(this._lineLayer);
}
this._lineLayer = this._band.createLayerDiv(1);
this._lineLayer.setAttribute("name", "ether-lines"); // for debugging
this._lineLayer.style.display = "none";
var minDate = this._band.getMinDate();
var maxDate = this._band.getMaxDate();
var timeZone = this._band.getTimeZone();
var labeller = this._band.getLabeller();
Timeline.DateTime.roundDownToInterval(minDate, this._unit, timeZone,
this._multiple, this._theme.firstDayOfWeek);
var p = this;
var incrementDate = function(date) {
for (var i = 0; i < p._multiple; i++) {
Timeline.DateTime.incrementByInterval(date, p._unit);
}
};
while (minDate.getTime() < maxDate.getTime()) {
this._intervalMarkerLayout.createIntervalMarker(
minDate, labeller, this._unit, this._markerLayer, this._lineLayer);
incrementDate(minDate);
}
this._markerLayer.style.display = "block";
this._lineLayer.style.display = "block";
};
Let me know if that works.
David
[EMAIL PROTECTED] wrote:
> Hello,
>
> I will make a project based SIMILE Timeline.
> To start with, I would like to create some examples to show to my team but I
> encountered 2 problems.
> I want to display 15 minutes and 5 minutes intervals and two different bands.
> The problem is that the labels are for example 7,22,37,52 (the values are
> different between IE6 and Firefox). (see attached pictures)
> Then when I drag horizontally or I resize the window, those values change with
> an undetermistic behaviour.
>
> So I would like to have labels like this: 14:00,15,30,45,15:00...
> Is there a function to fix the ethers?
>
> Thanks a lot.
> Romain
>
>
> here is my Javascript file:
>
> var tl;
>
> function onLoad() {
> var eventSourceTimeAxe = new Timeline.DefaultEventSource();
> var eventSourceIncident2 = new Timeline.DefaultEventSource();
> var date = "Tue Jun 26 2007 14:00:00 GMT+0800"
> var theme = Timeline.ClassicTheme.create();
> var bandInfos = [
> Timeline.createBandInfo({
> eventSource: eventSourceTimeAxe,
> date: date,
> width: "10%",
> intervalUnit: Timeline.DateTime.MINUTE,
> intervalPixels: 5,
> multiple: 15,
> timeZone: +8,
> theme: theme
>
> }),
> Timeline.createBandInfo({
> eventSource: eventSourceIncident2,
> date: date,
> width: "90%",
> intervalUnit: Timeline.DateTime.MINUTE,
> intervalPixels: 20,
> multiple: 5,
> magnify: 1,
> timeZone: +8,
> theme: theme
> })
>
> ];
>
> bandInfos[0].syncWith = 1;
> bandInfos[0].highlight = true;
>
>
> tl = Timeline.create(document.getElementById("timeline"),
> bandInfos,Timeline.HORIZONTAL);
> tl.loadXML("file:///E:\\Home\\Romain\\Desktop\\timeaxe.xml", function(xml,
> url) { eventSourceTimeAxe.loadXML(xml, url); });
> }
>
> var resizeTimerID = null;
> function onResize() {
> if (resizeTimerID == null) {
> resizeTimerID = window.setTimeout(function() {
> resizeTimerID = null;
> tl.layout();
> }, 500);
> }
> }
>
>
> ------------------------------------------------------------------------
>
>
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> General mailing list
> [email protected]
> http://simile.mit.edu/mailman/listinfo/general
>
_______________________________________________
General mailing list
[email protected]
http://simile.mit.edu/mailman/listinfo/general