gosling.js
gosling.js copied to clipboard
Overlaying a single track over multiple tracks
I think it would be useful to be able to add a single track as an overlay for multiple tracks. For example, for IslandViewer, where a point track is overlaid over multiple stacked tracks.

It is possible to implement this at the moment using multiple overlaid tracks with increasing y parameters.
Another use case for this would be overlaying a brush over multiple tracks. In the Gremlin example, this is done for each track individually, but I think it would be more intuitive to add the brush just once in a single overlay track.
Grammar-wise, we will need to allow StackedTracks
in OverlaidTracks
:
From
export interface OverlaidTracks extends CommonViewDef, Partial<SingleTrack> {
alignment: 'overlay';
tracks: PartialTrack[];
}
To
export interface OverlaidTracks extends CommonViewDef, Partial<SingleTrack> {
alignment: 'overlay';
tracks: (PartialTrack | StackedTracks)[];
}
This will be beneficial when a user wants to put a brush that spans across tracks in a view. At the moment, users have to put brushes on individual tracks for this.
A technical difficulty would be that (AFAIK) HiGlass does not allow overlaying a view on top of multiple views.