@worktile/gantt 12.2.2 → 12.2.3

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.
@@ -2066,17 +2066,19 @@
2066
2066
  };
2067
2067
  GanttDragContainer.prototype.emitLinkDragEnded = function (to) {
2068
2068
  var _a;
2069
- this.linkDragPath.to = to;
2070
- var dependencyType = getDependencyType(this.linkDragPath, (_a = this.ganttUpper.linkOptions) === null || _a === void 0 ? void 0 : _a.dependencyTypes);
2071
- this.linkDragPath.from.item.addLink({
2072
- link: this.linkDragPath.to.item.id,
2073
- type: dependencyType
2074
- });
2075
- this.linkDragEnded.emit({
2076
- source: this.linkDragPath.from.item.origin,
2077
- target: this.linkDragPath.to.item.origin,
2078
- type: dependencyType
2079
- });
2069
+ if (to) {
2070
+ this.linkDragPath.to = to;
2071
+ var dependencyType = getDependencyType(this.linkDragPath, (_a = this.ganttUpper.linkOptions) === null || _a === void 0 ? void 0 : _a.dependencyTypes);
2072
+ this.linkDragPath.from.item.addLink({
2073
+ link: this.linkDragPath.to.item.id,
2074
+ type: dependencyType
2075
+ });
2076
+ this.linkDragEnded.emit({
2077
+ source: this.linkDragPath.from.item.origin,
2078
+ target: this.linkDragPath.to.item.origin,
2079
+ type: dependencyType
2080
+ });
2081
+ }
2080
2082
  this.linkDraggingId = null;
2081
2083
  this.linkDragPath = { from: null, to: null };
2082
2084
  };
@@ -3075,6 +3077,9 @@
3075
3077
  ? InBarPosition.start
3076
3078
  : InBarPosition.finish }));
3077
3079
  }
3080
+ else {
3081
+ _this.dragContainer.emitLinkDragEnded();
3082
+ }
3078
3083
  event.source.reset();
3079
3084
  _this.barElement.classList.remove(activeClass);
3080
3085
  _this.destroyLinkDraggingLine();
@@ -3145,7 +3150,8 @@
3145
3150
  this.item = item;
3146
3151
  this.barElement = elementRef.nativeElement;
3147
3152
  this.ganttUpper = ganttUpper;
3148
- if (!item.draggable || (this.dragDisabled && this.linkDragDisabled)) {
3153
+ // if (!item.draggable || (this.dragDisabled && this.linkDragDisabled)) {
3154
+ if (this.dragDisabled && this.linkDragDisabled) {
3149
3155
  return;
3150
3156
  }
3151
3157
  else {
@@ -3253,7 +3259,7 @@
3253
3259
  return NgxGanttBarComponent;
3254
3260
  }(GanttItemUpper));
3255
3261
  NgxGanttBarComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0__namespace, type: NgxGanttBarComponent, deps: [{ token: GanttDragContainer }, { token: GanttBarDrag }, { token: i0__namespace.ElementRef }, { token: GANTT_UPPER_TOKEN }, { token: i0__namespace.NgZone }], target: i0__namespace.ɵɵFactoryTarget.Component });
3256
- NgxGanttBarComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.1.5", type: NgxGanttBarComponent, selector: "ngx-gantt-bar,gantt-bar", outputs: { barClick: "barClick" }, host: { properties: { "class.gantt-bar": "this.ganttItemClass" } }, providers: [GanttBarDrag], viewQueries: [{ propertyName: "contentElementRef", first: true, predicate: ["content"], descendants: true }, { propertyName: "handles", predicate: ["handle"], descendants: true }], usesInheritance: true, ngImport: i0__namespace, template: "<div class=\"gantt-bar-layer\">\n <div *ngIf=\"item.draggable && ganttUpper.draggable\" class=\"drag-handles\">\n <ng-container>\n <span class=\"handle\" #handle></span>\n <span class=\"handle\" #handle></span>\n </ng-container>\n </div>\n <div *ngIf=\"item.linkable && ganttUpper.linkable\" class=\"link-handles\">\n <span class=\"handle\"><span class=\"point\"></span></span>\n <span class=\"handle\"> <span class=\"point\"></span></span>\n </div>\n</div>\n<div class=\"gantt-bar-border\"></div>\n<div #content class=\"gantt-bar-content\" (click)=\"onBarClick($event)\">\n <div class=\"gantt-bar-content-progress\" *ngIf=\"item.progress >= 0\" [style.width.%]=\"item.progress * 100\"></div>\n <ng-template [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"{ item: item.origin, refs: item.refs }\"></ng-template>\n</div>\n", directives: [{ type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
3262
+ NgxGanttBarComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.1.5", type: NgxGanttBarComponent, selector: "ngx-gantt-bar,gantt-bar", outputs: { barClick: "barClick" }, host: { properties: { "class.gantt-bar": "this.ganttItemClass" } }, providers: [GanttBarDrag], viewQueries: [{ propertyName: "contentElementRef", first: true, predicate: ["content"], descendants: true }, { propertyName: "handles", predicate: ["handle"], descendants: true }], usesInheritance: true, ngImport: i0__namespace, template: "<div class=\"gantt-bar-layer\">\n <div class=\"drag-handles\">\n <ng-container *ngIf=\"item.draggable && ganttUpper.draggable\">\n <span class=\"handle\" #handle></span>\n <span class=\"handle\" #handle></span>\n </ng-container>\n </div>\n <div *ngIf=\"item.linkable && ganttUpper.linkable\" class=\"link-handles\">\n <span class=\"handle\"><span class=\"point\"></span></span>\n <span class=\"handle\"> <span class=\"point\"></span></span>\n </div>\n</div>\n<div class=\"gantt-bar-border\"></div>\n<div #content class=\"gantt-bar-content\" (click)=\"onBarClick($event)\">\n <div class=\"gantt-bar-content-progress\" *ngIf=\"item.progress >= 0\" [style.width.%]=\"item.progress * 100\"></div>\n <ng-template [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"{ item: item.origin, refs: item.refs }\"></ng-template>\n</div>\n", directives: [{ type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
3257
3263
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0__namespace, type: NgxGanttBarComponent, decorators: [{
3258
3264
  type: i0.Component,
3259
3265
  args: [{