Announcement

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

    Timeline event overlap

    SmartClient Version: v10.1p_2016-02-26/Pro Deployment (built 2016-02-26)

    I am having some problems with events in my timeline overlapping.
    Click image for larger version

Name:	TimelineOverlap.png
Views:	314
Size:	10.5 KB
ID:	235371

    As you can see, 3 events in the timeline are overlapping.

    Here is a testcase that shows the problem:
    Code:
        public Timeline getTimeline()
        {
            final Timeline timeline = new Timeline();  
            timeline.setHeight100();
            timeline.setCanRemoveEvents(false);
            timeline.setCanEditLane(true);  
            timeline.setShowEventDescriptions(false); 
            timeline.setEventSnapGap(1440); // 60 * 24
            timeline.setShowIndicators(true);
            timeline.setUseEventCanvasRolloverControls(false); 
            timeline.setFirstDayOfWeek(0);
            timeline.setLaneEventPadding(2); // add a little space around events  
            timeline.setShowWeekends(true);
            HeaderLevel[] headerLevels = new HeaderLevel[]{  
                new HeaderLevel(TimeUnit.WEEK),
                new HeaderLevel(TimeUnit.DAY)
            };  
            timeline.setHeaderLevels(headerLevels);  
            timeline.setLaneFields(new ListGridField[]{ new ListGridField("title", "Developer", 120)});  
            timeline.setLanes(TimelineLaneData.getRecords());  
            timeline.setData(TimelineData.getRecords());
            
            
            timeline.setDefaultTimelineColumnSpan(50);
            
            Date startDate = DateUtil.getAbsoluteDate(RelativeDate.WEEK_AGO);
            // if you don't call this, you'll get defaultTimelineColumnSpan columns (20)
            timeline.setStartDate(startDate);
            Date endDate = DateUtil.getAbsoluteDate(RelativeDate.WEEK_AGO);
            CalendarUtil.addDaysToDate(endDate, 50);
            timeline.setEndDate(endDate);
            
            return timeline;
        }
        
        public static class TimelineData {  
              
            private static CalendarEvent[] records;  
            private static Date today = new Date();  
            private static int year = today.getYear();  
            private static int month = today.getMonth();  
            private static int start = today.getDate();  
          
            public TimelineData() {  
            }  
            public static CalendarEvent[] getRecords() {  
                if (records == null) {  
                    records = getNewRecords();  
                }  
                return records;  
            }  
          
            public static CalendarEvent[] getNewRecords() {  
                
                return new CalendarEvent[]{  
                        new CalendarEvent(1, "Test 1", "", new Date(year, month, start - 1,0,0,0), new Date(year, month, start + 11,    0,0,0), "charlesMadigen"),  
                        new CalendarEvent(2, "Test 2", "", new Date(year, month, start,        0,0,0), new Date(year, month, start + 11,    0,0,0), "charlesMadigen"),
                        new CalendarEvent(3, "Test 3", "", new Date(year, month, start,        0,0,0), new Date(year, month, start + 12,    0,0,0), "charlesMadigen"),  
                        new CalendarEvent(4, "Test 4", "", new Date(year, month, start + 11,0,0,0), new Date(year, month, start + 15,    0,0,0), "charlesMadigen"),  
                        new CalendarEvent(5, "Test 5", "", new Date(year, month, start + 11,0,0,0), new Date(year, month, start + 16,    0,0,0), "charlesMadigen"),  
                        new CalendarEvent(6, "Test 6", "", new Date(year, month, start + 11,0,0,0), new Date(year, month, start + 17,    0,0,0), "charlesMadigen")
                };  
            }  
        }  
        
        public static class TimelineLaneData {  
              
            private static Lane[] records;  
          
            public static Lane[] getRecords() {  
                if (records == null) {  
                    records = getNewRecords();  
                }  
                return records;  
            }  
          
            public TimelineLaneData() {  
            }  
          
            public static Lane[] getNewRecords() {  
                Lane[] lanes = new Lane[]{  
                getLane("charlesMadigen", "Charles Madigen", "Managers"),  
                getLane("tamaraKane", "Tamara Kane", "Developers"),  
                getLane("darcyFeeney", "Darcy Feeney", "Managers"),  
                getLane("kaiKong", "Kai Kong", "Developers"),  
                getLane("shelleyFewel", "Shelley Fewel", "Managers"),  
                getLane("garretMonroe", "Garret Monroe", "Developers")  
                };  
                return lanes;  
            }  
          
            private static Lane getLane(String name, String title, String devGroup) {  
                Lane lane = new Lane(name, title);  
                lane.setAttribute("devGroup", devGroup);  
                return lane;  
            }  
        }

    #2
    We'll take a look.

    Comment


      #3
      Any progress on this?
      Have you been able to reproduce the issue?

      Comment


        #4
        I am still waiting for a fix to this issue.

        Comment


          #5
          Apologies for the delay on this - it's been fixed for builds dated April 7 and later. The subsystem has been re-implemented for timelines - hopefully, this will prevent any further edge-cases.

          Comment


            #6
            Awesome thanks, I will test it out together with 6.0

            Comment


              #7
              Awesome... this bug appears here to... it is related to "timeline.setEventSnapGap(1440); "... thanks for fixing

              Comment


                #8
                SmartClient Version: v11.0p_2016-04-07/Pro Deployment (built 2016-04-07)

                Hi, I just upgraded to 6.0 and even though the overlap issue is fixed for the above test-case I was able to provoke some other overlap issue after pulling on some of the events in the timeline.
                Click image for larger version

Name:	TimelineOverlap2.png
Views:	207
Size:	14.2 KB
ID:	236679
                Here is some data that shows the overlap, just replace it with the data in the above test-case.
                Code:
                            return new CalendarEvent[]{  
                                    new CalendarEvent(1, "Test 1", "", new Date(year, month, start - 1,0,0,0), new Date(year, month, start + 11,    0,0,0), "charlesMadigen"),  
                                    new CalendarEvent(2, "Test 2", "", new Date(year, month, start,        0,0,0), new Date(year, month, start + 11,    0,0,0), "charlesMadigen"),
                                    new CalendarEvent(3, "Test 3", "", new Date(year, month, start,        0,0,0), new Date(year, month, start + 17,    0,0,0), "charlesMadigen"),  
                                    new CalendarEvent(4, "Test 4", "", new Date(year, month, start + 11,0,0,0), new Date(year, month, start + 15,    0,0,0), "charlesMadigen"),  
                                    new CalendarEvent(5, "Test 5", "", new Date(year, month, start + 11,0,0,0), new Date(year, month, start + 16,    0,0,0), "charlesMadigen"),  
                                    new CalendarEvent(6, "Test 6", "", new Date(year, month, start -  3,0,0,0), new Date(year, month, start + 17,    0,0,0), "charlesMadigen")
                            };

                Comment


                  #9
                  I tried latest build from 09.04. und I receive the following error when I use the method "setEventSnapGap( 1440 );".

                  Code:
                  [ERROR] [com.uds.webadmin.GBookingAdmin] - 11:57:17.363:TMR0:WARN:TimelineView:isc_Timeline_0_timelineView:
                  [ERROR] [com.uds.webadmin.GBookingAdmin] - 11:57:19.862:TMR8:WARN:Log:TypeError: _16[_25].snapGaps.fill is not a function
                  Stack from error.stack:
                      TimelineView.tagDataForOverlap() @ com.uds.webadmin.GBookingAdmin/sc/modules/ISC_Calendar.js?isc_version=.js:312
                      CalendarView.refreshEvents() @ com.uds.webadmin.GBookingAdmin/sc/modules/ISC_Calendar.js?isc_version=.js:204
                      Class.invokeSuper() @ com.uds.webadmin.GBookingAdmin/sc/modules/ISC_Core.js?isc_version=.js:273
                      Class.Super() @ com.uds.webadmin.GBookingAdmin/sc/modules/ISC_Core.js?isc_version=.js:265
                      TimelineView.refreshEvents() @ com.uds.webadmin.GBookingAdmin/sc/modules/ISC_Calendar.js?isc_version=.js:330
                      Calendar.refreshSelectedView() @ com.uds.webadmin.GBookingAdmin/sc/modules/ISC_Calendar.js?isc_version=.js:431
                      Calendar.dataChanged() @ com.uds.webadmin.GBookingAdmin/sc/modules/ISC_Calendar.js?isc_version=.js:431
                      anonymous() @ com.uds.webadmin.GBookingAdmin/sc/modules/ISC_Core.js?isc_version=.js:59
                      thunk() @ com.uds.webadmin.GBookingAdmin/sc/modules/ISC_Core.js?isc_version=.js:316
                      observation() @ com.uds.webadmin.GBookingAdmin/sc/modules/ISC_Core.js?isc_version=.js:313
                      ResultSet._doneChangingData() @ com.uds.webadmin.GBookingAdmin/sc/modules/ISC_DataBinding.js?isc_version=.js:1924
                      ResultSet.handleUpdate() @ com.uds.webadmin.GBookingAdmin/sc/modules/ISC_DataBinding.js?isc_version=.js:1922
                      ResultSet.dataSourceDataChanged() @ com.uds.webadmin.GBookingAdmin/sc/modules/ISC_DataBinding.js?isc_version=.js:1919
                      anonymous() @ com.uds.webadmin.GBookingAdmin/sc/modules/ISC_Core.js?isc_version=.js:59
                      thunk() @ com.uds.webadmin.GBookingAdmin/sc/modules/ISC_Core.js?isc_version=.js:316
                      observation() @ com.uds.webadmin.GBookingAdmin/sc/modules/ISC_Core.js?isc_version=.js:313
                      DataSource.updateCaches() @ com.uds.webadmin.GBookingAdmin/sc/modules/ISC_DataBinding.js?isc_version=.js:497
                      [c]DataSource.handleUpdate() @ com.uds.webadmin.GBookingAdmin/sc/modules/ISC_DataBinding.js?isc_version=.js:279
                      DataSource.fireResponseCallbacks() @ com.uds.webadmin.GBookingAdmin/sc/modules/ISC_DataBinding.js?isc_version=.js:726
                      DataSource._completeResponseProcessing() @ com.uds.webadmin.GBookingAdmin/sc/modules/ISC_DataBinding.js?isc_version=.js:725
                      DataSource._handleClientOnlyReply/_6() @ com.uds.webadmin.GBookingAdmin/sc/modules/ISC_DataBinding.js?isc_version=.js:586
                      DataSource._handleClientOnlyReply() @ com.uds.webadmin.GBookingAdmin/sc/modules/ISC_DataBinding.js?isc_version=.js:587
                      [c]Class.fireCallback() @ com.uds.webadmin.GBookingAdmin/sc/modules/ISC_Core.js?isc_version=.js:282
                      [c]Class.fireCallback() @ com.uds.webadmin.GBookingAdmin/sc/modules/ISC_Core.js?isc_version=.js:350
                      anonymous() @ com.uds.webadmin.GBookingAdmin/sc/modules/ISC_DataBinding.js?isc_version=.js:1674
                      $wnd.isc.RPCManager.fireReplyCallback() @ :311
                      [c]RPCManager.fireReplyCallbacks() @ com.uds.webadmin.GBookingAdmin/sc/modules/ISC_DataBinding.js?isc_version=.js:1679
                      [c]RPCManager.performOperationReply() @ com.uds.webadmin.GBookingAdmin/sc/modules/ISC_DataBinding.js?isc_version=.js:1672
                      RPCManager._performTransactionReply() @ com.uds.webadmin.GBookingAdmin/sc/modules/ISC_DataBinding.js?isc_version=.js:1657
                      [c]Class.fireCallback() @ com.uds.webadmin.GBookingAdmin/sc/modules/ISC_Core.js?isc_version=.js:282
                      Timer._fireTimeout() @ com.uds.webadmin.GBookingAdmin/sc/modules/ISC_Core.js?isc_version=.js:1410
                      Timer.setTimeout/_6<() @ com.uds.webadmin.GBookingAdmin/sc/modules/ISC_Core.js?isc_version=.js:1407
                  Code:
                  calendar = new Timeline();
                          calendar.setShowEventDescriptions( true );
                          calendar.setShowQuickEventDialog( false );
                          calendar.setShowAddEventButton( false );
                  
                          calendar.setCanCreateEvents( true );
                          calendar.setCanRemoveEvents( true );
                          calendar.setCanResizeEvents( false );
                  
                          // Sets Hover
                          calendar.setHoverWidth( 500 );
                  
                          // Activate weekends
                          calendar.setDisableWeekends( false );
                          calendar.setShowWeekends( true );
                  
                          // 60min x 24h (Ignore Time)
                          calendar.setEventSnapGap( 1440 );
                          calendar.setEventAutoArrange( true );
                  
                          // Can not move via drag & drop to another lane
                          calendar.setCanEditLane( false );
                          calendar.setCanReorderLanes( true );
                          calendar.setLaneEventPadding( 2 );
                  
                          // Sets start and end date of calendar
                  
                          // Sets Calendar Start Date
                          Date startDateCalendar = new Date();
                          CalendarUtil.addDaysToDate( startDateCalendar, -1 );
                          CalendarUtil.resetTime( startDateCalendar );
                          calendar.setStartDate( startDateCalendar );
                        
                  
                          // Sets Calendar End Date
                          Date endDateCalendar = new Date();
                          CalendarUtil.addDaysToDate( endDateCalendar, 30 );
                          CalendarUtil.resetTime( endDateCalendar );
                          calendar.setEndDate( endDateCalendar );
                  
                          // Sets lane field (first Columns)
                          calendar.setLaneFields( new ListGridField[] { new ListGridField( "title", "Name", 350 ) } );
                  
                          // Init Lanes
                          calendar.setLanes( getLanes() );
                  
                          // Sets the indicators
                          calendar.setShowIndicators( false );
                          calendar.setIndicators( getIndicators() );
                  
                          // Inits Calendar Header
                          initHeaderLevels();
                  
                          // Sets the calendar dataSource
                          CAssignedShowPlaner dsClass = new CAssignedShowPlaner();
                          DataSource dataSource = dsClass.getDataSource( );
                          calendar.setDataSource( dataSource );
                          calendar.setAutoFetchData( true );
                  
                          calendar.draw();

                  Comment


                    #10
                    Which browser(s) are you seeing this in?

                    Comment


                      #11
                      andyx1975 - it looks like you saw your issue either in IE, or in an old version of some other browser, right? We fixed the RTE anyway, you can test out the fix in builds dated April 10 and later.

                      Niels_EMP - can you confirm *your* browser(s)? It seems like you may be using MS Edge??

                      With the latest framework code, we aren't seeing any overlap issues with the updated data-set you provided, or by dragging the events around in all manner of complex ways.

                      Whichever browser it is, can you retest with a build dated April 10 or later before getting back to us? Please also let us know if you see any errors or warnings in the Developer Console.
                      Last edited by Isomorphic; 9 Apr 2016, 06:45.

                      Comment


                        #12
                        I was using Chrome. Can't give the exact version before I'm back at the office Monday,

                        Maybe it has something to do with showWeekends, I just notice that it is set to true in the original test case but it was set to false when I saw the new overlap issue.

                        I will try again with the newest nightly Monday and upload a complete test case if I am still seeing it.

                        Comment


                          #13
                          Hi,

                          thanks for getting back. I am sitting behind linux mint and I am using firefox and chrome. I guess I used a build from 08.04. I will give it a try again... thanks. I will give you a feedback as soon as the build from 10.04. is out.

                          Niels_EMP
                          Maybe your timeshit issues are the same that I have here:
                          http://forums.smartclient.com/forum/...mezones-issues

                          Thanks and best regards
                          Andy
                          Last edited by andyx1975; 10 Apr 2016, 08:51.

                          Comment


                            #14
                            I just tested again with SmartClient Version: v11.0p_2016-04-09/Pro Deployment (built 2016-04-09) and the problem is still there.

                            As expected it seems to be timeline.setShowWeekends(false); that is causing the issue. The timeline looks fine when I show weekends.

                            I am using Chrome Version 49.0.2623.87 m

                            Here is the complete test case.
                            Code:
                                public Timeline getTimeline()
                                {  
                                    final Timeline timeline = new Timeline();  
                                    timeline.setHeight100();
                                    timeline.setCanRemoveEvents(false);
                                    timeline.setCanEditLane(true);  
                                    timeline.setShowEventDescriptions(false);
                                    timeline.setEventSnapGap(1440); // 60 * 24
                                    timeline.setShowIndicators(true);
                                    timeline.setUseEventCanvasRolloverControls(false);
                                    timeline.setFirstDayOfWeek(0);
                                    timeline.setLaneEventPadding(2); // add a little space around events  
                                    timeline.setDisableWeekends(false);
                                    timeline.setShowWeekends(false);
                                    HeaderLevel[] headerLevels = new HeaderLevel[]{  
                                        new HeaderLevel(TimeUnit.WEEK),
                                        new HeaderLevel(TimeUnit.DAY)
                                    };  
                                    timeline.setHeaderLevels(headerLevels);  
                                    timeline.setLaneFields(new ListGridField[]{ new ListGridField("title", "Developer", 120)});  
                                    timeline.setLanes(TimelineLaneData.getRecords());  
                                    timeline.setData(TimelineData.getRecords());
                                    Date startDate = new Date(116, 2, 7);
                                    // if you don't call this, you'll get defaultTimelineColumnSpan columns (20)
                                    timeline.setStartDate(startDate);
                                    Date endDate = new Date(116, 3, 7);
                                    timeline.setEndDate(endDate);
                                    
                                    return timeline;
                                }
                                
                                public static class TimelineData {  
                                      
                                    private static CalendarEvent[] records;  
                                    private static Date today = new Date(116, 2, 14);
                                    private static int year = today.getYear();  
                                    private static int month = today.getMonth();  
                                    private static int start = today.getDate();  
                                    
                                    public TimelineData() {  
                                    }  
                                    public static CalendarEvent[] getRecords() {  
                                        if (records == null) {  
                                            records = getNewRecords();  
                                        }  
                                        return records;  
                                    }  
                                  
                                    public static CalendarEvent[] getNewRecords() {  
                                        
                                        return new CalendarEvent[]{  
                                                new CalendarEvent(1, "Test 1", "", new Date(year, month, start - 1,0,0,0), new Date(year, month, start + 11,    0,0,0), "charlesMadigen"),  
                                                new CalendarEvent(2, "Test 2", "", new Date(year, month, start,        0,0,0), new Date(year, month, start + 11,    0,0,0), "charlesMadigen"),
                                                new CalendarEvent(3, "Test 3", "", new Date(year, month, start,        0,0,0), new Date(year, month, start + 17,    0,0,0), "charlesMadigen"),  
                                                new CalendarEvent(4, "Test 4", "", new Date(year, month, start + 11,0,0,0), new Date(year, month, start + 15,    0,0,0), "charlesMadigen"),  
                                                new CalendarEvent(5, "Test 5", "", new Date(year, month, start + 11,0,0,0), new Date(year, month, start + 16,    0,0,0), "charlesMadigen"),  
                                                new CalendarEvent(6, "Test 6", "", new Date(year, month, start -  3,0,0,0), new Date(year, month, start + 17,    0,0,0), "charlesMadigen")
                                        };  
                                    }  
                                }  
                                
                                public static class TimelineLaneData {  
                                      
                                    private static Lane[] records;  
                                  
                                    public static Lane[] getRecords() {  
                                        if (records == null) {  
                                            records = getNewRecords();  
                                        }  
                                        return records;  
                                    }  
                                  
                                    public TimelineLaneData() {  
                                    }  
                                  
                                    public static Lane[] getNewRecords() {  
                                        Lane[] lanes = new Lane[]{  
                                        getLane("charlesMadigen", "Charles Madigen", "Managers"),  
                                        getLane("tamaraKane", "Tamara Kane", "Developers"),  
                                        getLane("darcyFeeney", "Darcy Feeney", "Managers"),  
                                        getLane("kaiKong", "Kai Kong", "Developers"),  
                                        getLane("shelleyFewel", "Shelley Fewel", "Managers"),  
                                        getLane("garretMonroe", "Garret Monroe", "Developers")  
                                        };  
                                        return lanes;  
                                    }  
                                  
                                    private static Lane getLane(String name, String title, String devGroup) {  
                                        Lane lane = new Lane(name, title);  
                                        lane.setAttribute("devGroup", devGroup);  
                                        return lane;  
                                    }  
                                }
                            Last edited by Niels_EMP; 12 Apr 2016, 03:51.

                            Comment


                              #15
                              Ok, we see it now - happily, it's not a problem with the overlapping mechanism itself - the offending event wasn't being put into any slot because it started in a field which was hidden - that one's fixed for tomorrow's builds, but a similar issue is present for events that *end* in hidden fields, or are drag-resized *over* hidden fields.

                              We'll update again when we've ironed those out too.

                              Comment

                              Working...
                              X