PonteIneptique / simile-widgets

Automatically exported from code.google.com/p/simile-widgets
0 stars 0 forks source link

TIMELINE. When Timeline.VERTICAL no data are visible #138

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
TIMELINE scripts works nicely until I set Timeline.VERTICAL. When
Timeline.VERTICAL is set timeline is changed to vertical mode, but no data
from XML file are shown.

Win XP, Apache 1.3.34 

See Comments Timeline 8
Sorry, it's a known "unimplemented": DurationEventPainter doesn't handle
vertical layout as I wasn't sure how to. Horizontal layout is much easier
to handle as text flows horizontally and can be easily separated into
several tracks. For vertical layouts, the more parallel tracks you have,
the narrowing each track has to be and text will be forced to wrap into
very narrow columns. It won't be pretty. Suggestions are greatly appreciated!

[Submitted by Sankarshana on simile.mit.edu]

Original issue reported on code.google.com by GabrielR...@googlemail.com on 5 Apr 2009 at 1:45

GoogleCodeExporter commented 9 years ago
I have the same problem.

The same timeline.HORIZONTAL displaying correctly events , it simply don't 
display
any event from the same eventSource if created with .VERTICAL !

Did you solve this problem ?
I'm not using duration events, and using original and detailed painter on the 
two bands.

Original comment by litobyte...@gmail.com on 3 Aug 2009 at 8:23

GoogleCodeExporter commented 9 years ago
The DIV elements are painted to the screen but have co-ordinates that aren't 
viewable within the timeline.

The fix below is only for the time bars but labels can use the same technique:

Changes made to original-painter.js around lines 538-542

The orientation is not checked when the painter is called thus the styling for 
the time bar and label continue to have a Left, Top, Height and Width for a 
Horizontal timeline. Therefore, the script below is a replacement for around 
line 538 where these styling values are set. It checks the orientation and then 
makes the Left = top, Top = startPixel, Width = height and Height = width.

if(this._timeline.isHorizontal()){
    tapeDiv.style.left = startPixel + "px";
    tapeDiv.style.width = tapeWidth + "px";
    tapeDiv.style.height = tapeHeight + "px";
    tapeDiv.style.top = top + "px";
}
if(this._timeline.isVertical()){
    tapeDiv.style.top = startPixel + "px";
    tapeDiv.style.height = tapeWidth + "px";
    tapeDiv.style.width = tapeHeight + "px";
    tapeDiv.style.left = top + "px";
}

I have attached my version of the original-painter.js for review (check lines 
between 538 - 549).

J

Original comment by aabaai...@gmail.com on 27 Aug 2010 at 1:50

Attachments: