Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #101489
    Anonymous
    Inactive

    Hi,
    I have a question on the Gantt connections. I set the connection on the task element, with the id of  other task like target and type=1 :
    es:
    {“id”:”17″,”type”:”task”,”synchronized”:false,”label”:”test Task 1″,”expanded”:false,”progress”:85,”connections”:[{“target”:”59″,”type”:1,”lag”:0},{“target”:”62″,”type”:1,”lag”:0}],”dateStart”:”2020-04-01T22:00:00.000Z”,”dateEnd”:”2020-04-03T15:00:00.000Z”,”duration”:15,”resources”:[“00050″,”00012″,”00003″,”00185″],”disableResources”:false,”description”:”test”…{“id”:”59″,”type”:”task”,”synchronized”:false,”label”:”test relation”,”expanded”:false,”progress”:0,”connections”:[],”dateStart”:”2020-06-08T22:00:00.000Z”,”dateEnd”:”2020-06-10T11:00:00.000Z”,”duration”:12,”resources”:[],”disableResources”:false,”description”:”relation task”…
    The connections works correctly, but if I set autoschedule=true for the Gantt chart, this is not work because the target it’s not the id of the task but the position in the array (es: https://www.htmlelements.com/demos/gantt/auto-schedule/ ) this is correct? the connection targets must be the positions in the datasource array and not the id of the task? And why when use the events connectionEnd the startIndex and endIndex is always -1?
    Thank you in advance.
    Walter

    #101491
    Hristofor
    Member

    Hi Walter,
    Thank you for the feedback. The autoSchedule feature in the current version works only if the connection.target points to the index of a task not it’s id. This will be updated in order to support task ids as well in our next release. The connectionEnd event should return the indexes of the start and end tasks in the event.detail but it doesn’t which will also be fixed in our next release. As a solution may I suggest using the getTaskIndex( task: GanttChartTask) in order to get the index of the target task. The method accepts Smart.GanttChart task object or a direct DOM reference to the HTMLElement corresponding to the task id.
    Best Regards,
    Christopher
    Smart HTML Elements Team
    https://www.htmlelements.com

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.