|
|
|
@ -2,6 +2,7 @@ import { __extends, __values, __assign } from 'tslib';
|
|
|
|
import { InjectionToken, Injectable, EventEmitter, Component, ChangeDetectionStrategy, ElementRef, IterableDiffers, ChangeDetectorRef, NgZone, HostBinding, Input, Output, HostListener, Directive, Inject, ComponentFactoryResolver, ViewChild, ViewContainerRef, NgModule } from '@angular/core';
|
|
|
|
import { InjectionToken, Injectable, EventEmitter, Component, ChangeDetectionStrategy, ElementRef, IterableDiffers, ChangeDetectorRef, NgZone, HostBinding, Input, Output, HostListener, Directive, Inject, ComponentFactoryResolver, ViewChild, ViewContainerRef, NgModule } from '@angular/core';
|
|
|
|
import { Subject, of } from 'rxjs';
|
|
|
|
import { Subject, of } from 'rxjs';
|
|
|
|
import { debounceTime } from 'rxjs/operators';
|
|
|
|
import { debounceTime } from 'rxjs/operators';
|
|
|
|
|
|
|
|
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
|
|
import { CommonModule } from '@angular/common';
|
|
|
|
import { CommonModule } from '@angular/common';
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
@ -3121,6 +3122,7 @@ var NgxFlowchartComponent = /** @class */ (function () {
|
|
|
|
this.cd = cd;
|
|
|
|
this.cd = cd;
|
|
|
|
this.zone = zone;
|
|
|
|
this.zone = zone;
|
|
|
|
this.modelChanged = new EventEmitter();
|
|
|
|
this.modelChanged = new EventEmitter();
|
|
|
|
|
|
|
|
this.fitModelSizeByDefaultValue = true;
|
|
|
|
this.flowchartConstants = FlowchartConstants;
|
|
|
|
this.flowchartConstants = FlowchartConstants;
|
|
|
|
this.nodesDiffer = this.differs.find([]).create((/**
|
|
|
|
this.nodesDiffer = this.differs.find([]).create((/**
|
|
|
|
* @param {?} index
|
|
|
|
* @param {?} index
|
|
|
|
@ -3151,6 +3153,23 @@ var NgxFlowchartComponent = /** @class */ (function () {
|
|
|
|
enumerable: true,
|
|
|
|
enumerable: true,
|
|
|
|
configurable: true
|
|
|
|
configurable: true
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
Object.defineProperty(NgxFlowchartComponent.prototype, "fitModelSizeByDefault", {
|
|
|
|
|
|
|
|
get: /**
|
|
|
|
|
|
|
|
* @return {?}
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
function () {
|
|
|
|
|
|
|
|
return this.fitModelSizeByDefaultValue;
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
set: /**
|
|
|
|
|
|
|
|
* @param {?} value
|
|
|
|
|
|
|
|
* @return {?}
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
function (value) {
|
|
|
|
|
|
|
|
this.fitModelSizeByDefaultValue = coerceBooleanProperty(value);
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
enumerable: true,
|
|
|
|
|
|
|
|
configurable: true
|
|
|
|
|
|
|
|
});
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* @return {?}
|
|
|
|
* @return {?}
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@ -3222,7 +3241,7 @@ var NgxFlowchartComponent = /** @class */ (function () {
|
|
|
|
event.preventDefault();
|
|
|
|
event.preventDefault();
|
|
|
|
})
|
|
|
|
})
|
|
|
|
};
|
|
|
|
};
|
|
|
|
this.adjustCanvasSize(false);
|
|
|
|
this.adjustCanvasSize(this.fitModelSizeByDefault);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* @return {?}
|
|
|
|
* @return {?}
|
|
|
|
@ -3269,7 +3288,7 @@ var NgxFlowchartComponent = /** @class */ (function () {
|
|
|
|
}));
|
|
|
|
}));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (nodesChanged_1) {
|
|
|
|
if (nodesChanged_1) {
|
|
|
|
this.adjustCanvasSize(false);
|
|
|
|
this.adjustCanvasSize(this.fitModelSizeByDefault);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (nodesChanged_1 || edgesChanged_1) {
|
|
|
|
if (nodesChanged_1 || edgesChanged_1) {
|
|
|
|
this.cd.detectChanges();
|
|
|
|
this.cd.detectChanges();
|
|
|
|
@ -3540,6 +3559,7 @@ var NgxFlowchartComponent = /** @class */ (function () {
|
|
|
|
nodeHeight: [{ type: Input }],
|
|
|
|
nodeHeight: [{ type: Input }],
|
|
|
|
dropTargetId: [{ type: Input }],
|
|
|
|
dropTargetId: [{ type: Input }],
|
|
|
|
modelChanged: [{ type: Output }],
|
|
|
|
modelChanged: [{ type: Output }],
|
|
|
|
|
|
|
|
fitModelSizeByDefault: [{ type: Input }],
|
|
|
|
dragover: [{ type: HostListener, args: ['dragover', ['$event'],] }],
|
|
|
|
dragover: [{ type: HostListener, args: ['dragover', ['$event'],] }],
|
|
|
|
drop: [{ type: HostListener, args: ['drop', ['$event'],] }],
|
|
|
|
drop: [{ type: HostListener, args: ['drop', ['$event'],] }],
|
|
|
|
mousedown: [{ type: HostListener, args: ['mousedown', ['$event'],] }],
|
|
|
|
mousedown: [{ type: HostListener, args: ['mousedown', ['$event'],] }],
|
|
|
|
@ -3569,6 +3589,11 @@ if (false) {
|
|
|
|
NgxFlowchartComponent.prototype.dropTargetId;
|
|
|
|
NgxFlowchartComponent.prototype.dropTargetId;
|
|
|
|
/** @type {?} */
|
|
|
|
/** @type {?} */
|
|
|
|
NgxFlowchartComponent.prototype.modelChanged;
|
|
|
|
NgxFlowchartComponent.prototype.modelChanged;
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* @type {?}
|
|
|
|
|
|
|
|
* @private
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
NgxFlowchartComponent.prototype.fitModelSizeByDefaultValue;
|
|
|
|
/** @type {?} */
|
|
|
|
/** @type {?} */
|
|
|
|
NgxFlowchartComponent.prototype.callbacks;
|
|
|
|
NgxFlowchartComponent.prototype.callbacks;
|
|
|
|
/** @type {?} */
|
|
|
|
/** @type {?} */
|
|
|
|
|