@visactor/vtable-plugins 1.19.4 → 1.19.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -16652,7 +16652,8 @@
16652
16652
  CLICK_DEPENDENCY_LINK_POINT: "click_dependency_link_point",
16653
16653
  CONTEXTMENU_DEPENDENCY_LINK: "contextmenu_dependency_link",
16654
16654
  CLICK_MARKLINE_CREATE: "click_markline_create",
16655
- CLICK_MARKLINE_CONTENT: "click_markline_content"
16655
+ CLICK_MARKLINE_CONTENT: "click_markline_content",
16656
+ MOVE_END_TASK_BAR: "move_end_task_bar"
16656
16657
  };
16657
16658
 
16658
16659
  function throttle(func, delay) {
@@ -20804,7 +20805,8 @@
20804
20805
  deltaY = this.moveTaskBar.deltaY,
20805
20806
  target = this.moveTaskBar.target;
20806
20807
  if (Math.abs(deltaX) >= 1 || Math.abs(deltaY) >= 1) {
20807
- const taskIndex = target.task_index,
20808
+ const oldRowIndex = target.task_index,
20809
+ taskIndex = target.task_index,
20808
20810
  sub_task_index = target.sub_task_index,
20809
20811
  {
20810
20812
  startDate: oldStartDate,
@@ -20830,6 +20832,30 @@
20830
20832
  index: taskIndex,
20831
20833
  record: newRecord
20832
20834
  });
20835
+ const newRowIndex = getTaskIndexsByTaskY(targetEndY, this._gantt).task_index;
20836
+ this._gantt.hasListeners(GANTT_EVENT_TYPE.MOVE_END_TASK_BAR) && this._gantt.fireListeners(GANTT_EVENT_TYPE.MOVE_END_TASK_BAR, {
20837
+ startDate: newRecord[this._gantt.parsedOptions.startDateField],
20838
+ endDate: newRecord[this._gantt.parsedOptions.endDateField],
20839
+ oldStartDate: oldStartDate,
20840
+ oldEndDate: oldEndDate,
20841
+ oldRowIndex: oldRowIndex,
20842
+ newRowIndex: newRowIndex,
20843
+ index: taskIndex,
20844
+ record: newRecord
20845
+ });
20846
+ } else {
20847
+ const newRecord = this._gantt.getRecordByIndex(taskIndex, sub_task_index),
20848
+ newRowIndex = getTaskIndexsByTaskY(targetEndY, this._gantt).task_index;
20849
+ this._gantt.hasListeners(GANTT_EVENT_TYPE.MOVE_END_TASK_BAR) && this._gantt.fireListeners(GANTT_EVENT_TYPE.MOVE_END_TASK_BAR, {
20850
+ startDate: newRecord[this._gantt.parsedOptions.startDateField],
20851
+ endDate: newRecord[this._gantt.parsedOptions.endDateField],
20852
+ oldStartDate: oldStartDate,
20853
+ oldEndDate: oldEndDate,
20854
+ oldRowIndex: oldRowIndex,
20855
+ newRowIndex: newRowIndex,
20856
+ index: newRowIndex,
20857
+ record: newRecord
20858
+ });
20833
20859
  }
20834
20860
  if (this._gantt.parsedOptions.tasksShowMode === TasksShowMode.Sub_Tasks_Arrange || this._gantt.parsedOptions.tasksShowMode === TasksShowMode.Sub_Tasks_Compact) {
20835
20861
  const indexs = getTaskIndexsByTaskY(targetEndY, this._gantt);