|
1 | 1 | /** @license |
2 | 2 |
|
3 | | -dhtmlxGantt v.9.0.12 Standard |
| 3 | +dhtmlxGantt v.9.0.13 Standard |
4 | 4 |
|
5 | 5 | This version of dhtmlxGantt is distributed under GPL 2.0 license and can be legally used in GPL projects. |
6 | 6 |
|
@@ -211,9 +211,11 @@ function locateClassName(e, classname, strict) { |
211 | 211 | return null; |
212 | 212 | } |
213 | 213 | function getRelativeEventPosition(ev, node) { |
214 | | - var d = document.documentElement; |
215 | | - var box = getNodePosition(node); |
216 | | - return { x: ev.clientX + d.scrollLeft - d.clientLeft - box.x + node.scrollLeft, y: ev.clientY + d.scrollTop - d.clientTop - box.y + node.scrollTop }; |
| 214 | + var _a; |
| 215 | + const d = document.documentElement; |
| 216 | + const box = getNodePosition(node); |
| 217 | + const { clientX, clientY } = ((_a = ev.touches) == null ? void 0 : _a[0]) ?? ev; |
| 218 | + return { x: clientX + d.scrollLeft - d.clientLeft - box.x + node.scrollLeft, y: clientY + d.scrollTop - d.clientTop - box.y + node.scrollTop }; |
217 | 219 | } |
218 | 220 | function getRelativeNodePosition(child, parent) { |
219 | 221 | const childPos = getNodePosition(child); |
@@ -6276,11 +6278,7 @@ var createLinksStoreFacade = function() { |
6276 | 6278 | }, isLinkExists: function(id) { |
6277 | 6279 | return this.$data.linksStore.exists(id); |
6278 | 6280 | }, addLink: function(link) { |
6279 | | - const newLink = this.$data.linksStore.addItem(link); |
6280 | | - if (this.$data.linksStore.isSilent()) { |
6281 | | - this.$data.linksStore.fullOrder.push(newLink); |
6282 | | - } |
6283 | | - return newLink; |
| 6281 | + return this.$data.linksStore.addItem(link); |
6284 | 6282 | }, updateLink: function(id, data2) { |
6285 | 6283 | if (!defined(data2)) data2 = this.getLink(id); |
6286 | 6284 | this.$data.linksStore.updateItem(id, data2); |
@@ -8138,14 +8136,21 @@ function initDataStores(gantt2) { |
8138 | 8136 | if (gantt2.isTaskExists(link.source)) { |
8139 | 8137 | var sourceTask = gantt2.getTask(link.source); |
8140 | 8138 | sourceTask.$source = sourceTask.$source || []; |
8141 | | - sourceTask.$source.push(link.id); |
| 8139 | + if (noDuplicateIds(link.id, sourceTask.$source)) { |
| 8140 | + sourceTask.$source.push(link.id); |
| 8141 | + } |
8142 | 8142 | } |
8143 | 8143 | if (gantt2.isTaskExists(link.target)) { |
8144 | 8144 | var targetTask = gantt2.getTask(link.target); |
8145 | 8145 | targetTask.$target = targetTask.$target || []; |
8146 | | - targetTask.$target.push(link.id); |
| 8146 | + if (noDuplicateIds(link.id, targetTask.$target)) { |
| 8147 | + targetTask.$target.push(link.id); |
| 8148 | + } |
8147 | 8149 | } |
8148 | 8150 | } |
| 8151 | + function noDuplicateIds(id, array) { |
| 8152 | + return array.indexOf(String(id)) === -1 && array.indexOf(Number(id)) === -1; |
| 8153 | + } |
8149 | 8154 | function sync_link_delete(link) { |
8150 | 8155 | if (gantt2.isTaskExists(link.source)) { |
8151 | 8156 | var sourceTask = gantt2.getTask(link.source); |
@@ -9333,6 +9338,7 @@ let DataProcessor$1 = class DataProcessor { |
9333 | 9338 | if (this._tMode === "CUSTOM") { |
9334 | 9339 | const taskState = this.getState(rowId); |
9335 | 9340 | const taskAction = this.getActionByState(taskState); |
| 9341 | + delete dataToSend[this.action_param]; |
9336 | 9342 | const ganttMode = this.getGanttMode(); |
9337 | 9343 | const _onResolvedCreateUpdate = (tag) => { |
9338 | 9344 | let action = taskState || "updated"; |
@@ -13788,6 +13794,9 @@ function data(gantt2) { |
13788 | 13794 | task.duration = task.duration || 0; |
13789 | 13795 | if (this.config.min_duration === 0 && task.duration === 0) { |
13790 | 13796 | task.$no_end = false; |
| 13797 | + if (task.type === gantt2.config.types.project && gantt2.hasChild(task.id)) { |
| 13798 | + task.$no_end = true; |
| 13799 | + } |
13791 | 13800 | } |
13792 | 13801 | var effectiveCalendar = this.getTaskCalendar(task); |
13793 | 13802 | if (task.$effective_calendar && task.$effective_calendar !== effectiveCalendar.id) { |
@@ -14557,7 +14566,7 @@ function i18nFactory() { |
14557 | 14566 | } |
14558 | 14567 | function DHXGantt() { |
14559 | 14568 | this.constants = constants; |
14560 | | - this.version = "9.0.12"; |
| 14569 | + this.version = "9.0.13"; |
14561 | 14570 | this.license = "gpl"; |
14562 | 14571 | this.templates = {}; |
14563 | 14572 | this.ext = {}; |
|
0 commit comments