On Oct 27, 2012, at 4:27 AM, Arttu Laaksonen wrote:
> Hello,
>
> I have a timeline that is quite high (1600 pixels) and requires up-down
> scrolling. There are two bands, the overview at top (32 pixels) and the main
> band below which is 1568 pixels in height. The date markers are now shown
> only at the bottom of the main band. I know how to move them to the top but
> would it be possible somehow to have them both at the top and at the bottom
> of the main band. Has anyone figured out a way to do this?
You'll need to write custom code to do this. The marker code is complex, but
the key is the _markerLayer in the EtherPainter. The default
GregorianEtherPainter class has a single _markerLayer div. All you would need
to do is create a second marker layer div, position it at the top (or bottom)
of your band and just call the intervalMarkerLayout.createIntervalMarker with
the second marker layer div:
in your CustomEtherPainter.paint() function:
this._markerLayer2 = this._band.createLayerDiv(100);
….
while (minDate.getTime() < maxDate.getTime()) {
this._intervalMarkerLayout.createIntervalMarker(
minDate, labeller, this._unit, this._markerLayer, this._lineLayer);
this._intervalMarkerLayout.createIntervalMarker(
minDate, labeller, this._unit, this._markerLayer2, this._lineLayer);
incrementDate(minDate);
}
If you don't want to do custom EtherPainters, you could use something like
jQuery to grab the markerLayer from the band, clone it, and attach it to the
top of the band. Less elegant, but might be easier for your application.
--Mike
--
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.