Luis,

I had a similar problem and here's what I did:

1) I put each subsystem (meeting room in your case) into its own band. My
timeline has 19 bands with hundreds of events, and no performance problems
so you should be okay.

2) I used the "trackNum" attribute for each event. Make all the events for
each band have the same track number.

3) After I did these two things, I still had a problem with timeline
rendering events on different tracks. Timeline does not like the events to
touch each other, so before it draws an event it will figure out if it needs
to draw on a different track by checking to see if the new event will be
touching another event already drawn. I changed one line of code to allow
touching. In original-painter.js, look for the function _findFreeTrack().
Change this:

     if (t > rightEdge) {
            break;
        }

to this:

     if (t >= rightEdge) { //TV. add = so duration events can butt up
against each other.
            break;
        }


After this, your duration events will be allowed to touch each other (but
not overlap).

--Trudy



On Mon, May 16, 2011 at 6:00 PM, mleden <[email protected]> wrote:

> Hi Luis,
>
> One way to simulate what you want, I think, would be to have each
> Meeting Room represented as a separate Band within the Timeline.  This
> takes a little extra work but gives you the additional flexibility of
> being able to decorate each band uniquely.  The entire Timeline can
> still be made to scroll and span in unison (as does the "default
> single-banded variety").  I do something similar for a Timeline I
> maintain at work that represents "events" for each sub-team within our
> division (sort of a poor man's GANTT with each Band representing a
> single sub-team).  Unfortunately, I can't point you to the URL because
> it is inside our firewall but, if you think this might be a solution
> for you and you need more details, let me know.
>
> -Mark
>
>
> On May 15, 7:04 pm, Luis Cabral <[email protected]> wrote:
> > Hi there,
> >
> > I am using the the Timeline widget for a booking system. Each duration
> > "event" in fact is a free or booked slot for a resource (meeting rooms
> for
> > instance). The user can click on a free slot to create a booking for the
> > resource. This is working fine.
> >
> > However, I am getting something like this:
> >
> > [--MR 1 Free slot----]-------------------------------------------[---MR 2
> > free slot----]
> > -----------------------------[---MR 1 Booked
> > slot------]-------------------------------------
> > [--MR 2 Free
> >
> slot-----------]-----------------------------------------------------------------
> > ------------------------------------[---MR 2 Booked
> > slot------------]-------------------------------
> >
> -------------------------------------------------------------------[---------MR
> > 1 free slot-----------]
> >
> > Ideally, what I would like to see is something like this:
> >
> > [--MR 1 Free slot----][---MR 1 Booked slot------][---------MR 1 free
> > slot-----------]
> > [--MR 2 Free slot-----------][---MR 2 Booked slot------------][---MR 2
> free
> > slot----]
> >
> > I.e. all "events" related to the same meeting room in the same line. Is
> it
> > possible to achieve this?
> >
> > Thanks
> > Luis
>
> --
> 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.
>
>

-- 
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.

Reply via email to