Hi Steve,
No, I don't have any such example. The timeline view in Exhibit is
implemented here
http://static.simile.mit.edu/exhibit/extensions-2.0/time/scripts/timeline-view.js
Find the method
Exhibit.TimelineView.prototype._reconstruct
You can try to override it by including something like this after
including the timeline extension to Exhibit.
<script>
var oldReconstruct = Exhibit.TimelineView.prototype._reconstruct;
Exhibit.TimelineView.prototype._reconstruct = function() {
oldReconstruct.call(this);
// do something with this._eventSource or this._timeline
// this would be a deep hack, and it only resizes the timeline
based on the number
// of currently visible tracks. If the timeline has more
tracks somewhere else,
// when that section of the timeline is panned to, some events
will not be visible.
var trackCount =
this._timeline.getBand(0).getEventPainter()._tracks.length;
this._dom.plotContainer.style.height = (20 * trackCount) +
"px"; // or something like that
};
</script>
David
Stephen Martino wrote:
> Thanks David, that worked fine. Do you have any examples of auto
> adjusting the height of the timeline in Exhibit to fit the number of
> events that are on the screen. The concern I have is that if I narrow
> down my list of items the events center horizontally in the timeline
> view, what would be better if the timeline height could shrink and
> grow as events are brought in or eliminated.
>
> thanks
>
> Steve
> On Sat, Sep 13, 2008 at 2:33 PM, David Huynh <[EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>> wrote:
>
>
> Yes, that's possible--it's just normal CSS. If you specify "100%"
> and it
> still doesn't take up the maximum possible width, then that's because
> some of the parent elements are not set to 100%. You can use
> Firebug to
> try to see which element is not set to 100%.
>
> David
>
> Stephen Martino wrote:
> > Does anyone have any ideas on whether this is possible?
> >
> > On Fri, Sep 5, 2008 at 11:27 AM, Stephen Martino
> <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
> > <mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>> wrote:
> >
> > To the group,
> >
> > I have the below statement in my timelineConfig to set the width
> > of the timeline to 1280 pixel. What would be optimal is to be
> > able to use a percentage setting here, ie: 100% so that it
> adjusts
> > automatically to the resolution of the screen, ie: it fits into
> > the screen resolution that the user is using...any thoughts?
> >
> > thanks
> >
> > Steve
> >
> > var timelineConfig = {
> > timelineConstructor: function (div, eventSource) {
> > div.style.width="1280px";
> >
> >
> >
> >
> > >
>
>
>
>
>
> >
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---