@workiom/frappe-gantt 1.0.20 → 1.0.21
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.
- package/README.md +8 -5
- package/dist/frappe-gantt.es.js +554 -544
- package/dist/frappe-gantt.umd.js +25 -25
- package/package.json +1 -1
- package/src/dependency_shifting.js +56 -33
- package/src/index.js +15 -0
package/README.md
CHANGED
|
@@ -169,17 +169,20 @@ let tasks = [
|
|
|
169
169
|
|
|
170
170
|
#### Dependency Shifting Configuration
|
|
171
171
|
|
|
172
|
-
The `dependency_shifting` option controls how dependent tasks respond when a bar is dragged
|
|
172
|
+
The `dependency_shifting` option controls how dependent tasks respond when a bar is dragged or resized.
|
|
173
173
|
|
|
174
174
|
**Available Modes:**
|
|
175
175
|
|
|
176
176
|
- **`none`** (default): No shifting. Dependency arrows may visually overlap — no correction is applied.
|
|
177
177
|
|
|
178
|
-
- **`maintain_buffer_all`**:
|
|
178
|
+
- **`maintain_buffer_all`**: Shifts tasks by the same delta to preserve all gaps. Direction depends on the interaction:
|
|
179
|
+
- **Drag**: both upstream and downstream tasks shift
|
|
180
|
+
- **Right-resize** (end date changes): downstream tasks shift
|
|
181
|
+
- **Left-resize** (start date changes): upstream tasks shift
|
|
179
182
|
|
|
180
|
-
- **`maintain_buffer_downstream`**:
|
|
183
|
+
- **`maintain_buffer_downstream`**: Only downstream (child) tasks ever shift — regardless of whether the bar was dragged or resized. Left-resize does nothing.
|
|
181
184
|
|
|
182
|
-
- **`consume_buffer`**: Dependency-type-aware shifting. A shift only happens when a real conflict exists —
|
|
185
|
+
- **`consume_buffer`**: Dependency-type-aware shifting. A shift only happens when a real conflict exists — remaining buffer is consumed silently. When buffer is exhausted, the minimum required shift is applied. Direction follows the same rules as `maintain_buffer_all` (drag → both, right-resize → downstream, left-resize → upstream).
|
|
183
186
|
|
|
184
187
|
Conflict conditions per dependency type:
|
|
185
188
|
| Type | Conflict when |
|
|
@@ -198,7 +201,7 @@ let gantt = new Gantt("#gantt", tasks, {
|
|
|
198
201
|
```
|
|
199
202
|
|
|
200
203
|
**Behavior notes:**
|
|
201
|
-
- Shifting fires after
|
|
204
|
+
- Shifting fires after release (mouseup), not during live dragging or resizing
|
|
202
205
|
- When a task has multiple predecessors, the maximum required shift is applied (ensures all constraints are satisfied)
|
|
203
206
|
- Cycles in the dependency graph are safely skipped
|
|
204
207
|
|