Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Timeline events rendering question

    Smart GWT 4.0d (SmartClient Version: v9.0d_2013-06-17/PowerEdition Deployment (built 2013-06-17))

    We display longer blocks and shorter events in the Timeline view. It looks great. Usually the block goes the upper part of the lane row, and the other events are below it.

    But sometimes they swapped. As you can see on the attached screen shot blocks #45 and #46 went to the bottom of their lane while others are in the upper area.

    We would like to have the longer events first in a lane. Is it possible? Please advise. Thanks.
    Attached Files
    Last edited by miskolczi.peter; 20 Jun 2013, 05:05.

    #2
    Not currently, no - the events are automatically sorted by startDate

    Comment


      #3
      And could it be added some extra property with we could control the rendering order? Or let us sort the events allowing the custom orders? Thanks.

      Comment


        #4
        Partially resolved

        Adjusting the start/end +1ms/-1ms for the other events resolved the problem, when the block and the event started on the same time.

        So, referring back to the screen shot we are OK with the #45 (went up), but #46 is still down because of #39.

        That means we are OK for the most of the cases, but would be nice to handle the situation some event start earlier than a block in the same lane.

        Thank you.

        Comment


          #5
          Can you be more precise about what you need?

          Is it that you just want to be able to ALWAYS have the longest events at the top of each lane? If so, there is already an API for doing this (a secondary sort for timeline events) - however, that method is currently undocumented and, so, unsupported.

          Given more information, we can determine whether this or a similar API needs to be added publicly.

          Comment


            #6
            We have two kinds of events, blocks would go up and appointments down in a lane. (Blocks are usually the longer, but short blocks are allowed as well).

            That secondary short sounds good for us; assuming sorting the events (blocks first and then appointments) would result blocks in top and the rest in the bottom.

            In the case of only blocks or appointments in a certain time range, they can fill the whole lane height (as they rendered now).

            The goal is to have the block (46) in the top although app (39) starts earlier in screen shot of entry #1. Thank you.

            Comment


              #7
              We've added calendar.overlapSortSpecifiers, which is an array of SortSpecifier objects that affect the vertical rendering order of events in a given lane.

              The default behavior remains the same - if the new attribute is not set, a default sortSpecifier is added (by startDateField ascending).

              Note that fields must be available on the CalendarEvents.

              In your case, you could add a "length" attribute to your CalendarEvents, either in the data or via transformData, and set overlapSortSpecifiers to ann array with a sortSpecifier having property: "length" and direction: "descending"

              Or, you could add a "type" field of some kind that causes your "blocks" to always be sorted to the top

              Comment


                #8
                Sounds very good - thank you guys!

                Actually can't see changes in 4.0p 2013-07-25 build, so I guess it also arrives tomorrow?

                Comment


                  #9
                  Resolved

                  Smart GWT 4.0p (SmartClient Version: v9.0p_2013-07-28/PowerEdition Deployment (built 2013-07-28))

                  It is working as expected. Thank you.

                  Comment

                  Working...
                  X