Announcement

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

    Timeline initial Lane sorting

    Dear developers.
    I have a tree displayed.
    Click image for larger version

Name:	Zwischenablage-1.jpg
Views:	222
Size:	31.4 KB
ID:	265696
    I want to display the tree items in the same order in the Timeline, while I use the following code, but I have shuffled Lanes in an order unknown to me.

    Code:
    ListGrid tasksLineProps = new ListGrid();
    tasksLineProps.setCanSort(false);
    tasksLine = new Timeline();
    tasksLine.setAutoChildProperties("timelineView", tasksLineProps);
    ......
    ......
    TreeNode courseItemNode = projectTree.findById(courseItem.getAttribute(CONSTANT._ID));
    firstLevel = projectTree.getLevel(courseItemNode);
    Record[] lanes = projectTree.getAllNodes(courseItemNode);
    
    tasksLanes = EvolutionDataSource.castRecordsToLanes(lanes);
    tasksLine.setLanes(tasksLanes);
    Click image for larger version

Name:	Zwischenablage-2.jpg
Views:	186
Size:	27.3 KB
ID:	265697
    In previous versions, this was not the case. The order was maintained.

    SmartClient Ajax RIA system
    Version v12.1p_2021-05-19/Pro Deployment (2021-05-19)
    Last edited by Hirn; 16 Jun 2021, 22:59.

    #2
    Dear developers.
    Do you have any thoughts on this problem?

    Comment


      #3
      We'll take a look today and update here

      Comment


        #4
        We tested this out and we're not able to reproduce any kind of sorting problems. We tried calling setLanes() before and after draw(), resorting the Tree and then recreating the timeline or just re-applying the new node-order to the existing one. And everything seems to work as expected.

        It's not clear what the problem is, without seeing more code, but one thing you could check is the code in, and the order of the items before and after you call, castRecordsToLanes() - not all Sets guarantee order, and our equivalent test-code just loops over the nodes as-sorted and creates new Lanes in a Lane[]

        We'll likely need to see a list of affected browsers and some runnable code that shows the issue in order to help further.
        Last edited by Isomorphic; 23 Jun 2021, 01:06.

        Comment


          #5
          I will try to prepare a working example in the next day.
          It is strange that everything works correctly in the LGPL Version SNAPSHOT_v13.0d_2020-08-09, but not in the LGPL Version SNAPSHOT_v13.0d_2021-05-06

          We switched to the Pro version in May and I can't say which version stopped workin
          Last edited by Hirn; 23 Jun 2021, 04:18.

          Comment


            #6
            I have prepared an example that displays my problem
            TestBug.java projectTree.json.txt

            Comment


              #7
              Thanks for the test case - there was indeed a bug, introduced with some recent optimizations and resulting in an internal loop over an unordered map of lanes, rather than the array of lanes.

              We've made a change to address it - please retest with a build dated June 29 or later.
              Last edited by Isomorphic; 29 Jun 2021, 05:16.

              Comment

              Working...
              X