Announcement

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

    bug when hiding lanes in timeline view

    Hello,
    hiding unused lanes and rebuilding the timline will hide the lanes but the events too.
    kind regards paul
    1. v12.1p_2020-04-23/Pro Development Only
    2. Chrome Version 81.0.4044.129


    6. sample code
    /*******************************/
    var _today = isc.DateUtil.getStartOf(new Date(2020, 6, 5), "W");
    var _start = _today.getDate() - _today.getDay();
    var _month = _today.getMonth();
    var _year = _today.getFullYear();


    var events = [

    {
    eventId: 1,
    name: "Betoniere",
    description: "Betoniere das Dach",
    startDate: isc.DateUtil.getStartOf(new Date(_year, _month, _start + 2), "D"),
    endDate: isc.DateUtil.getEndOf(new Date(_year, _month, _start + 8), "D"),
    marOrAmObjId: "100464361"
    },

    {
    eventId: 2,
    name: "Ausruhen",
    description: "leg dich hin",
    startDate: isc.DateUtil.getStartOf(new Date(_year, _month, _start + 2), "D"),
    endDate: isc.DateUtil.getEndOf(new Date(_year, _month, _start + 8), "D"),
    marOrAmObjId: "100464361"
    },

    {
    eventId: 3,
    name: "Schalen",
    description: "die Decke und die Wand",
    startDate: isc.DateUtil.getStartOf(new Date(_year, _month, _start + 2), "D"),
    endDate: isc.DateUtil.getEndOf(new Date(_year, _month, _start + 8), "D"),
    marOrAmObjId: "3044776"
    }
    ];


    var mitarbeiter = [
    {title: "Betonierer,Karsten", name: "100464361", marOrAmObjId: "100464361", height: 60}
    , {title: "Schaler,Jörg", name: "35263686", marOrAmObjId: "35263686", height: 60}
    , {title: "Hammerwerfer,Heinz", name: "16034905", marOrAmObjId: "16034905", height: 60}
    , {title: "Rumkugler,Thersa", name: "80644197", marOrAmObjId: "80644197", height: 60}
    , {title: "Papst,Paul", name: "3044776", marOrAmObjId: "3044776", height: 60}
    , {title: "Bischof,Ernst", name: "20340259", marOrAmObjId: "20340259", height: 60}
    , {title: "Strauß,Michael", name: "14212526", marOrAmObjId: "14212526", height: 60}
    ];


    var _calStart = isc.DateUtil.getStartOf(new Date(2020, 6, 5), "W");
    var _calEnd = _calStart.duplicate();
    _calEnd.setDate(_calEnd.getDate() + 20);
    isc.ToolStrip.create({
    ID: "toolstrip",
    width: "100%"
    });

    var unusedLanesForm = toolstrip.addFormItem({ name: "hideUnusedLanes", title: "Hide Unused Lanes", titleOrientation: "top", type: "boolean", changed: "timeline.hideUnusedLanes = this.getValue(); timeline.rebuild();" });


    isc.Timeline.create({
    ID: "timeline",
    height: 451,
    startDate: _calStart,
    endDate: _calEnd,
    autoDraw : false,
    canEditLane : true,
    canResizeEvents : true,
    canAcceptDrop : true,
    snapOnDrop : false,
    canDragEvents : true,
    canEditEvents: true,
    showWeekends : true,
    showAddEventButton : false,
    showEventDescriptions : true,
    showControlsBar : false,
    rowHeight : 65,
    autoFetchData : false,
    data: events,
    lanes: mitarbeiter ,
    laneNameField : "marOrAmObjId",
    headerLevels: [ { unit: "week" }, { unit: "day" } ],
    laneFields: [ { name: "title", title: "Developer", minWidth: 120, autoFitWidth: true } ],
    showEventDescriptions: false,
    disableWeekends: false,
    laneEventPadding: 2,
    // hide events whose name does not contain the "eventFilter"
    rebuild : function () {
    // rebuild the timelineView
    this.getSelectedView().rebuild(true);
    }
    });

    isc.VStack.create({
    width: "100%",
    membersMargin: 8,
    members: [ toolstrip, timeline ]
    });

    #2
    We see the problem and will update here when we have it fixed.

    Comment


      #3
      We've made a fix for this (a case where we were not taking your custom laneNameField into account) - you can retest with a build dated May 5 or later.

      Note that we also made some optimisations, and added setHideUnusedLanes() - you should call that instead of rebuild(), which is much less efficient - we'll update our Timeline Filtering example to show the new technique as well.
      Last edited by Isomorphic; 3 May 2020, 21:19.

      Comment


        #4
        Bug is fixed, but
        setHideUnusedLanes()
        not implemented.
        Regards
        Paul

        Comment

        Working...
        X