Announcement

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

    Event snaps wrong in a timeline view

    Hello,

    an event snaps wrong in a timeline view when the event snap gap is 15.

    Here is the example code: SmartGWTTest.java

    We are using Version v11.0p_2016-06-23/Pro Deployment (2016-06-23)

    Regards

    Peter

    #2
    We don't see an issue here - what do you mean by "an event snaps wrong"? What are the steps to reproduce the problem?

    Comment


      #3
      Hello,

      create an event for Tamara Kane via Edit details dialog with begin at 07:00 and end at 08:00. It was displayed like you see in the screenshots.

      Click image for larger version

Name:	EventSnapWrong2.jpg
Views:	50
Size:	13.0 KB
ID:	238842 Click image for larger version

Name:	EventSnapWrong.jpg
Views:	51
Size:	25.6 KB
ID:	238843

      Peter

      Comment


        #4
        Ok, we see the issue now - it's not actually to do with the eventSnapGap, but a result of various API usage/order of operations issues: you set manuafactured start and end dates but no granularity to round to, and then set headerLevels (granularity) at the last minute.

        We'll make a note to see if there's a framework change we need to make here, but your easiest fix is to remove your call to setEndDate() (setResolution() will override it anyway) and instead of calling setHeaderLevels() at the end, pass the headerLevels in a call to setResolution(), indicating that you want a range of 24 hours:

        Code:
                // REPLACE THIS
                //HeaderLevel[] headerLevels = new HeaderLevel[] { new HeaderLevel(TimeUnit.DAY), new HeaderLevel(TimeUnit.HOUR) };
                //calendar.setHeaderLevels(headerLevels);
                
                // WITH THIS
                calendar.setResolution(new HeaderLevel[] { new HeaderLevel(TimeUnit.DAY), new HeaderLevel(TimeUnit.HOUR) }, TimeUnit.HOUR, 24);
        Note also that setCanResizeTimelineEvents() is deprecated and there's no need to call setChosenDate() either.

        Comment


          #5
          Thank you,

          that's work.

          Peter

          Comment

          Working...
          X