Commit 671b505b authored by Igor Kulikov's avatar Igor Kulikov

Fix

parent 3abd1987
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('rxjs'), require('@angular/common')) :
typeof define === 'function' && define.amd ? define('ngx-flowchart', ['exports', '@angular/core', 'rxjs', '@angular/common'], factory) :
(global = global || self, factory(global['ngx-flowchart'] = {}, global.ng.core, global.rxjs, global.ng.common));
}(this, (function (exports, core, rxjs, common) { 'use strict';
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('rxjs'), require('rxjs/operators'), require('@angular/common')) :
typeof define === 'function' && define.amd ? define('ngx-flowchart', ['exports', '@angular/core', 'rxjs', 'rxjs/operators', '@angular/common'], factory) :
(global = global || self, factory(global['ngx-flowchart'] = {}, global.ng.core, global.rxjs, global.rxjs.operators, global.ng.common));
}(this, (function (exports, core, rxjs, operators, common) { 'use strict';
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
......@@ -548,11 +548,13 @@
*/
var FcModelService = /** @class */ (function () {
function FcModelService(modelValidation, model, modelChanged, cd, selectedObjects, dropNode, createEdge, edgeAddedCallback, nodeRemovedCallback, edgeRemovedCallback, canvasHtmlElement, svgHtmlElement) {
var _this = this;
this.connectorsHtmlElements = {};
this.nodesHtmlElements = {};
this.canvasHtmlElement = null;
this.dragImage = null;
this.svgHtmlElement = null;
this.debouncer = new rxjs.Subject();
this.modelValidation = modelValidation;
this.model = model;
this.modelChanged = modelChanged;
......@@ -586,6 +588,12 @@
this.connectors = new ConnectorsModel(this);
this.nodes = new NodesModel(this);
this.edges = new EdgesModel(this);
this.debouncer
.pipe(operators.debounceTime(100))
.subscribe((/**
* @return {?}
*/
function () { return _this.modelChanged.emit(); }));
}
/**
* @return {?}
......@@ -594,7 +602,7 @@
* @return {?}
*/
function () {
this.modelChanged.emit();
this.debouncer.next();
};
/**
* @return {?}
......@@ -985,8 +993,16 @@
FcModelService.prototype.edgeRemovedCallback;
/** @type {?} */
FcModelService.prototype.dropTargetId;
/** @type {?} */
/**
* @type {?}
* @private
*/
FcModelService.prototype.modelChanged;
/**
* @type {?}
* @private
*/
FcModelService.prototype.debouncer;
/** @type {?} */
FcModelService.prototype.connectors;
/** @type {?} */
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
import { InjectionToken, Injectable, EventEmitter, Component, ChangeDetectionStrategy, ElementRef, IterableDiffers, ChangeDetectorRef, NgZone, HostBinding, Input, Output, HostListener, Directive, Inject, ComponentFactoryResolver, ViewChild, ViewContainerRef, NgModule } from '@angular/core';
import { of } from 'rxjs';
import { Subject, of } from 'rxjs';
import { debounceTime } from 'rxjs/operators';
import { CommonModule } from '@angular/common';
/**
......@@ -346,6 +347,7 @@ class FcModelService {
this.canvasHtmlElement = null;
this.dragImage = null;
this.svgHtmlElement = null;
this.debouncer = new Subject();
this.modelValidation = modelValidation;
this.model = model;
this.modelChanged = modelChanged;
......@@ -379,12 +381,18 @@ class FcModelService {
this.connectors = new ConnectorsModel(this);
this.nodes = new NodesModel(this);
this.edges = new EdgesModel(this);
this.debouncer
.pipe(debounceTime(100))
.subscribe((/**
* @return {?}
*/
() => this.modelChanged.emit()));
}
/**
* @return {?}
*/
notifyModelChanged() {
this.modelChanged.emit();
this.debouncer.next();
}
/**
* @return {?}
......@@ -686,8 +694,16 @@ if (false) {
FcModelService.prototype.edgeRemovedCallback;
/** @type {?} */
FcModelService.prototype.dropTargetId;
/** @type {?} */
/**
* @type {?}
* @private
*/
FcModelService.prototype.modelChanged;
/**
* @type {?}
* @private
*/
FcModelService.prototype.debouncer;
/** @type {?} */
FcModelService.prototype.connectors;
/** @type {?} */
......
This source diff could not be displayed because it is too large. You can view the blob instead.
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 { of } from 'rxjs';
import { Subject, of } from 'rxjs';
import { debounceTime } from 'rxjs/operators';
import { CommonModule } from '@angular/common';
/**
......@@ -350,11 +351,13 @@ function fcTopSort(graph) {
*/
var FcModelService = /** @class */ (function () {
function FcModelService(modelValidation, model, modelChanged, cd, selectedObjects, dropNode, createEdge, edgeAddedCallback, nodeRemovedCallback, edgeRemovedCallback, canvasHtmlElement, svgHtmlElement) {
var _this = this;
this.connectorsHtmlElements = {};
this.nodesHtmlElements = {};
this.canvasHtmlElement = null;
this.dragImage = null;
this.svgHtmlElement = null;
this.debouncer = new Subject();
this.modelValidation = modelValidation;
this.model = model;
this.modelChanged = modelChanged;
......@@ -388,6 +391,12 @@ var FcModelService = /** @class */ (function () {
this.connectors = new ConnectorsModel(this);
this.nodes = new NodesModel(this);
this.edges = new EdgesModel(this);
this.debouncer
.pipe(debounceTime(100))
.subscribe((/**
* @return {?}
*/
function () { return _this.modelChanged.emit(); }));
}
/**
* @return {?}
......@@ -396,7 +405,7 @@ var FcModelService = /** @class */ (function () {
* @return {?}
*/
function () {
this.modelChanged.emit();
this.debouncer.next();
};
/**
* @return {?}
......@@ -787,8 +796,16 @@ if (false) {
FcModelService.prototype.edgeRemovedCallback;
/** @type {?} */
FcModelService.prototype.dropTargetId;
/** @type {?} */
/**
* @type {?}
* @private
*/
FcModelService.prototype.modelChanged;
/**
* @type {?}
* @private
*/
FcModelService.prototype.debouncer;
/** @type {?} */
FcModelService.prototype.connectors;
/** @type {?} */
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -18,7 +18,8 @@ export declare class FcModelService {
nodeRemovedCallback: (node: FcNode) => void;
edgeRemovedCallback: (edge: FcEdge) => void;
dropTargetId: string;
modelChanged: EventEmitter<any>;
private readonly modelChanged;
private readonly debouncer;
connectors: ConnectorsModel;
nodes: NodesModel;
edges: EdgesModel;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment