DHTMLX / gantt

GPL version of Javascript Gantt Chart
https://dhtmlx.com/docs/products/dhtmlxGantt/
GNU General Public License v2.0
1.48k stars 324 forks source link

With multi-select on, There is a problem with the performance of undo #105

Open sunxd-lab opened 11 months ago

sunxd-lab commented 11 months ago

When I batch select and drag many times,then undo. It's not back to where it was last time.

gantt.plugins({ undo: true, multiselect:true, });

gearcoded commented 11 months ago

@sunxd-lab, Most likely, the issue occurs because of a bug in Gantt with the multiselect extension. When the extension is added and you select a task, the events fire twice for that task if you do something with it.

But if you make the changes with the Gantt API, the Undo extension can revert the changes correctly. For example, you can select several tasks in the following sample and use the Move Forward and Move Backward buttons. After you undo the changes, the dates will be restored correctly: https://docs.dhtmlx.com/gantt/samples/?sample=%2702_extensions/09_multiselection.html%27&filter=%27multi%27

But if you move tasks manually, they will have different dates after you undo the changes.

The dev team will fix the bug in the future, but I cannot give you any ETA.