robicch / jQueryGantt

jQuery Gantt editor

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

why gantt sometimes output the tasks out of order

zlv-thisF opened this issue · comments

jquery gantt editor is awesome !!!

i use it in an iframe in to interface with my page, the messsage.js code is like below:

 // button onclick is saveGanttOnServe
function saveGanttOnServer() {
      var prj = ge.saveProject();
      messageService.save(prj);
}

in messageService.js

save(project) {
    this.postMessage({ event: "save", content: project });
 }
postMessage(msg) {
    window.parent.postMessage(xxxxxx, content: msg.content }, "*");
}

but sometimes i check the message posted from gantt iframe, it turns out that the tasks is not execpected:
two types of error have been found in my project as
1 out of order -- the main task which level is 0 is in the middle of the tasks array
2 missing data -- the main task which level is 0 is missing (in that case , some other tasks is missing too)

it confused my quite a lot ... any idea how the strange behavior come from ?
thanks a lot