Announcement

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

    #16
    You don't need the call to rebuild() - get rid of that and let us know what you see. If the first resize attempt seems not to work, let us know about that, but please also have a second attempt and post both results.
    Last edited by Isomorphic; 28 May 2015, 09:21.

    Comment


      #17
      I have removed the rebuild() but still see the same problem.

      I have a feeling you haven't understood what the problem is. Please reread the reply from 24th May 2015 11:53, and see the screenshot. The problem is not with the resize, that is just what triggers the adding of the client-side events. The problem is that resize-controls show up on the wrong elements.

      Are you able to replicate this using the test case?

      Comment


        #18
        Yes, we understand what you're saying. Did you try the resize more than once as we suggested you should? We expect that you will see everything work as you expect on the second and subsequent attempts, and it will help to know if you do.

        Comment


          #19
          Okay, so when I resize a second time, the resize-controls disappear from the "clientSide" events like they should, but the resize-controls are still missing from 1 of the regular events (The one called Datasource Transaction-handling, see attached screenshot).

          If I resize a third time then the resize-controls reappear on the "clientSide" events and it looks just like after the 1st resize.

          It keeps alternating like this with every resize.
          Attached Files

          Comment


            #20
            Okay, this is a bug in the eventCanvasPooling implementation - state isn't being fully reset when an eventCanvas is re-used. We'll look into it and update here when we have a fix.

            Comment


              #21
              Something of a delay replying to this one - firstly, we're not sure if the technique you show in your test case is a technique you're actually using in your live code base, but it's not a very good idea, either way.

              If you don't want the timeline to show the events it will naturally retrieve, don't ask it to retrieve them - just retrieve the ones you actually want, externally, and then setData() with the events you care about.

              For your issues, though, we made some changes to 5.1 some days ago, and these are ported to 5.0 in time for builds dated June 10.

              From your perspective, all events should now be assigned correct rolloverControls, even when useEventCanvasRolloverControls is false, as it is for you.

              Secondly, a bunch of optimizations have been made to the rendering process, including blocking two expensive memory leaks in your circumstance.

              Let us know if you have further issues.

              Comment


                #22
                Thank you, I'll try out the nightly tomorrow.

                Let me try to explain in more detail what I do. (See attached screenshot for a picture of my current implementation)

                I'm using the timeline to allocate work to the employees of a company. These allocations(green) have a percentage showing how much of the employee's time should be spend on this task. All these allocations are saved in my database and is fetched normally by the timeline.

                When the allocations have been fetched I add some more events on the client-side to show where employees have time available(grey) or have been over-allocated(red).

                Whenever an allocation is changed/added/removed in a lane, these client-side events then have to be updated to reflect this, so I basically run thought all the events in the timeline, filter out the "client-side" events of lane, calculate the new "client-side" events for the lanes and add them to the rest, and then setData on the timeline with the new data.

                I'm debating whether or not to calculate the "client-side" events on the server instead, and then send together with the allocations in the fetch-servlet, but then I am unsure how I would handle the changed/added/removed case without having to re-fetch the whole thing again.

                I hope this casts some light on my specific case, if you have any other questions or suggestions, please let me know.

                PS. Right now I am calculating the highest amount of overlapping events on each lane and setting the lane height based on that because I don't want the events to become unreadable.
                Is there a better/easier way to do this? It would be nice if I could set a minimum allowed eventHeight and the lanes would then expand to accommodate that.
                Attached Files

                Comment


                  #23
                  SmartClient Version: v10.0p_2015-06-11/Pro Deployment (built 2015-06-11)

                  After testing with the new build, I'm seeing a some problems.

                  Events can overlap with a single day(or whatever the EventSnapGap is), this is also visible in the showcase: http://www.smartclient.com/smartgwt/showcase/#simple_timeline (try to move events so they overlap a single day)

                  Also, when updating an event's enddate by dragging on the right resize control, the enddate and preview is calculated wrong. This bug is also in the same showcase as above.

                  Attached is a picture that shows both bugs in the showcase.

                  I also found that when I add events to the timeline they are not drawn and I think this is also visible in the showcase. (If I press a date in the show case and add an event, it doesn't show up)


                  But the EventCanvasRolloverControls are showing perfectly :)

                  /Niels
                  Attached Files

                  Comment


                    #24
                    Ok, we'll take a look at those new issues, which are a result of optimizations to drawing and measuring APIs, and update here in a day or two.

                    Comment


                      #25
                      Of your three issues - we fixed adding an event, and we're looking into the right-drag issue (and the size of the red drag-rectangle, which is also wrong, because it's using the same calculation).

                      But we're not sure what issue you're pointing out in your first point, about events overlapping on a single day - the image you attached doesn't seem to show any issues.

                      Can you rephrase what it is that you think is wrong?

                      Comment


                        #26
                        If you look at the screenshot again you can see that the event "Datasource Transaction-handling" is being overlaped by another event on the date 6/6 (the one I marked with a red square).

                        I attached another screenshot that shows it a little better.
                        Attached Files

                        Comment


                          #27
                          Ah, ok, we thought you were pointing out something in the first lane.

                          As we indicated, these were all related and are all fixed for builds dated June 16 or later - let us know if anything else crops up.

                          Comment


                            #28
                            SmartClient Version: v10.0p_2015-06-16/Pro Deployment (built 2015-06-16)

                            Hi, the new update works great but there is one new problem that showed up.

                            When I use setUseEventCanvasRolloverControls(false) the events show CloseButtons and ContextButtons even if I use setCanRemoveEvents(false).
                            These buttons don't show up if I use rollover controls.

                            I have attached a screenshot of the buttons i question.

                            My Timeline settings:
                            Code:
                            timeline = new Timeline();
                            timeline.setWidth100();
                            timeline.setDisableWeekends(false);
                            timeline.setDateFormatter(DateDisplayFormat.TOEUROPEANSHORTDATE);
                            timeline.setShowEventDescriptions(false);
                            timeline.setCanCreateEvents(false);
                            timeline.setEventLaneFieldTitle("Person");
                            timeline.setShowControlsBar(false);
                            timeline.setShowQuickEventDialog(false);
                            timeline.setCanRemoveEvents(false);
                            timeline.setLaneEventPadding(3);
                            timeline.setOverlapSortSpecifiers(new SortSpecifier("sortOrder", SortDirection.ASCENDING));
                            timeline.setLaneFields(new ListGridField("title", "People", 210));
                            timeline.setLanes(lanes);
                            timeline.setDataSource(ds);
                            timeline.setCanAcceptDrop(true);
                            timeline.setShowZones(true);
                            timeline.setZones(holidays.toArray(new CalendarEvent[holidays.size()]));
                            timeline.setUseEventCanvasRolloverControls(false);
                            timeline.setCanEditLane(false);
                            Canvas properties = new Canvas();
                            properties.setHoverWidth(500);
                            timeline.setAutoChildProperties("eventCanvas", properties);
                            timeline.setDateStyleCustomizer(new DateStyleCustomizer() {
                            	
                            	@Override
                            	public String getDateStyle(Date date, int rowNum, int colNum, CalendarView calendarView) {
                            		// If we are currently showing the day view, set a different style for weekend days.
                            		if(timeline.getTimelineGranularity() == TimeUnit.DAY)
                            		{
                            			for (Integer weekendDay : DateUtil.getWeekendDays()) {
                            				if(date.getDay() == weekendDay)
                            					return "calendarResourcePlanningWorkdayDisabled";
                            			}
                            		}
                            		return null;
                            	}
                            });
                            timeline.setEventHeaderHTMLCustomizer(new EventHeaderHTMLCustomizer() {
                            	
                            	@Override
                            	public String getEventHeaderHTML(CalendarEvent calendarEvent, CalendarView calendarView) {
                            		
                            		return "<table width='100%' height='100%' cellspacing='0' cellpadding='0'><tbody><tr><td valign='middle' align='middle' >" + calendarEvent.getName() + "</td></tr></tbody></table>";
                            	}
                            });
                            Attached Files

                            Comment


                              #29
                              Ohh and also I just realized that events with canEdit = false still show resize controls when setUseEventCanvasRolloverControls is false.

                              This is also visible on the grey event on the screenshot above.


                              And when I run the Test-Case from post #12 I see some weird behavior.
                              Every time I update an event (to trigger the adding if the client events) it alternates between showing and not showing the "New Event 2" event. (see attached)

                              If I run the test-case without the rebuild command as you suggested, then the timeline doesn't change on the first event update, but if I then use the timeline controls to move forward and back in time then the change has become visible, so it seems like something is wrong with the drawing of the timeline in that case.
                              Attached Files
                              Last edited by Niels_EMP; 17 Jun 2015, 07:15. Reason: Found another error

                              Comment


                                #30
                                Are you able to recreate the behavior I see?

                                Comment

                                Working...
                                X