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

Fix

parent 3abd1987
(function (global, factory) { (function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('rxjs'), require('@angular/common')) : 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', '@angular/common'], factory) : 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.ng.common)); (global = global || self, factory(global['ngx-flowchart'] = {}, global.ng.core, global.rxjs, global.rxjs.operators, global.ng.common));
}(this, (function (exports, core, rxjs, common) { 'use strict'; }(this, (function (exports, core, rxjs, operators, common) { 'use strict';
/*! ***************************************************************************** /*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved. Copyright (c) Microsoft Corporation. All rights reserved.
...@@ -548,11 +548,13 @@ ...@@ -548,11 +548,13 @@
*/ */
var FcModelService = /** @class */ (function () { var FcModelService = /** @class */ (function () {
function FcModelService(modelValidation, model, modelChanged, cd, selectedObjects, dropNode, createEdge, edgeAddedCallback, nodeRemovedCallback, edgeRemovedCallback, canvasHtmlElement, svgHtmlElement) { function FcModelService(modelValidation, model, modelChanged, cd, selectedObjects, dropNode, createEdge, edgeAddedCallback, nodeRemovedCallback, edgeRemovedCallback, canvasHtmlElement, svgHtmlElement) {
var _this = this;
this.connectorsHtmlElements = {}; this.connectorsHtmlElements = {};
this.nodesHtmlElements = {}; this.nodesHtmlElements = {};
this.canvasHtmlElement = null; this.canvasHtmlElement = null;
this.dragImage = null; this.dragImage = null;
this.svgHtmlElement = null; this.svgHtmlElement = null;
this.debouncer = new rxjs.Subject();
this.modelValidation = modelValidation; this.modelValidation = modelValidation;
this.model = model; this.model = model;
this.modelChanged = modelChanged; this.modelChanged = modelChanged;
...@@ -586,6 +588,12 @@ ...@@ -586,6 +588,12 @@
this.connectors = new ConnectorsModel(this); this.connectors = new ConnectorsModel(this);
this.nodes = new NodesModel(this); this.nodes = new NodesModel(this);
this.edges = new EdgesModel(this); this.edges = new EdgesModel(this);
this.debouncer
.pipe(operators.debounceTime(100))
.subscribe((/**
* @return {?}
*/
function () { return _this.modelChanged.emit(); }));
} }
/** /**
* @return {?} * @return {?}
...@@ -594,7 +602,7 @@ ...@@ -594,7 +602,7 @@
* @return {?} * @return {?}
*/ */
function () { function () {
this.modelChanged.emit(); this.debouncer.next();
}; };
/** /**
* @return {?} * @return {?}
...@@ -985,8 +993,16 @@ ...@@ -985,8 +993,16 @@
FcModelService.prototype.edgeRemovedCallback; FcModelService.prototype.edgeRemovedCallback;
/** @type {?} */ /** @type {?} */
FcModelService.prototype.dropTargetId; FcModelService.prototype.dropTargetId;
/** @type {?} */ /**
* @type {?}
* @private
*/
FcModelService.prototype.modelChanged; FcModelService.prototype.modelChanged;
/**
* @type {?}
* @private
*/
FcModelService.prototype.debouncer;
/** @type {?} */ /** @type {?} */
FcModelService.prototype.connectors; FcModelService.prototype.connectors;
/** @type {?} */ /** @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 { 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'; import { CommonModule } from '@angular/common';
/** /**
...@@ -346,6 +347,7 @@ class FcModelService { ...@@ -346,6 +347,7 @@ class FcModelService {
this.canvasHtmlElement = null; this.canvasHtmlElement = null;
this.dragImage = null; this.dragImage = null;
this.svgHtmlElement = null; this.svgHtmlElement = null;
this.debouncer = new Subject();
this.modelValidation = modelValidation; this.modelValidation = modelValidation;
this.model = model; this.model = model;
this.modelChanged = modelChanged; this.modelChanged = modelChanged;
...@@ -379,12 +381,18 @@ class FcModelService { ...@@ -379,12 +381,18 @@ class FcModelService {
this.connectors = new ConnectorsModel(this); this.connectors = new ConnectorsModel(this);
this.nodes = new NodesModel(this); this.nodes = new NodesModel(this);
this.edges = new EdgesModel(this); this.edges = new EdgesModel(this);
this.debouncer
.pipe(debounceTime(100))
.subscribe((/**
* @return {?}
*/
() => this.modelChanged.emit()));
} }
/** /**
* @return {?} * @return {?}
*/ */
notifyModelChanged() { notifyModelChanged() {
this.modelChanged.emit(); this.debouncer.next();
} }
/** /**
* @return {?} * @return {?}
...@@ -686,8 +694,16 @@ if (false) { ...@@ -686,8 +694,16 @@ if (false) {
FcModelService.prototype.edgeRemovedCallback; FcModelService.prototype.edgeRemovedCallback;
/** @type {?} */ /** @type {?} */
FcModelService.prototype.dropTargetId; FcModelService.prototype.dropTargetId;
/** @type {?} */ /**
* @type {?}
* @private
*/
FcModelService.prototype.modelChanged; FcModelService.prototype.modelChanged;
/**
* @type {?}
* @private
*/
FcModelService.prototype.debouncer;
/** @type {?} */ /** @type {?} */
FcModelService.prototype.connectors; FcModelService.prototype.connectors;
/** @type {?} */ /** @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 { __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 { of } from 'rxjs'; import { Subject, of } from 'rxjs';
import { debounceTime } from 'rxjs/operators';
import { CommonModule } from '@angular/common'; import { CommonModule } from '@angular/common';
/** /**
...@@ -350,11 +351,13 @@ function fcTopSort(graph) { ...@@ -350,11 +351,13 @@ function fcTopSort(graph) {
*/ */
var FcModelService = /** @class */ (function () { var FcModelService = /** @class */ (function () {
function FcModelService(modelValidation, model, modelChanged, cd, selectedObjects, dropNode, createEdge, edgeAddedCallback, nodeRemovedCallback, edgeRemovedCallback, canvasHtmlElement, svgHtmlElement) { function FcModelService(modelValidation, model, modelChanged, cd, selectedObjects, dropNode, createEdge, edgeAddedCallback, nodeRemovedCallback, edgeRemovedCallback, canvasHtmlElement, svgHtmlElement) {
var _this = this;
this.connectorsHtmlElements = {}; this.connectorsHtmlElements = {};
this.nodesHtmlElements = {}; this.nodesHtmlElements = {};
this.canvasHtmlElement = null; this.canvasHtmlElement = null;
this.dragImage = null; this.dragImage = null;
this.svgHtmlElement = null; this.svgHtmlElement = null;
this.debouncer = new Subject();
this.modelValidation = modelValidation; this.modelValidation = modelValidation;
this.model = model; this.model = model;
this.modelChanged = modelChanged; this.modelChanged = modelChanged;
...@@ -388,6 +391,12 @@ var FcModelService = /** @class */ (function () { ...@@ -388,6 +391,12 @@ var FcModelService = /** @class */ (function () {
this.connectors = new ConnectorsModel(this); this.connectors = new ConnectorsModel(this);
this.nodes = new NodesModel(this); this.nodes = new NodesModel(this);
this.edges = new EdgesModel(this); this.edges = new EdgesModel(this);
this.debouncer
.pipe(debounceTime(100))
.subscribe((/**
* @return {?}
*/
function () { return _this.modelChanged.emit(); }));
} }
/** /**
* @return {?} * @return {?}
...@@ -396,7 +405,7 @@ var FcModelService = /** @class */ (function () { ...@@ -396,7 +405,7 @@ var FcModelService = /** @class */ (function () {
* @return {?} * @return {?}
*/ */
function () { function () {
this.modelChanged.emit(); this.debouncer.next();
}; };
/** /**
* @return {?} * @return {?}
...@@ -787,8 +796,16 @@ if (false) { ...@@ -787,8 +796,16 @@ if (false) {
FcModelService.prototype.edgeRemovedCallback; FcModelService.prototype.edgeRemovedCallback;
/** @type {?} */ /** @type {?} */
FcModelService.prototype.dropTargetId; FcModelService.prototype.dropTargetId;
/** @type {?} */ /**
* @type {?}
* @private
*/
FcModelService.prototype.modelChanged; FcModelService.prototype.modelChanged;
/**
* @type {?}
* @private
*/
FcModelService.prototype.debouncer;
/** @type {?} */ /** @type {?} */
FcModelService.prototype.connectors; FcModelService.prototype.connectors;
/** @type {?} */ /** @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 { ...@@ -18,7 +18,8 @@ export declare class FcModelService {
nodeRemovedCallback: (node: FcNode) => void; nodeRemovedCallback: (node: FcNode) => void;
edgeRemovedCallback: (edge: FcEdge) => void; edgeRemovedCallback: (edge: FcEdge) => void;
dropTargetId: string; dropTargetId: string;
modelChanged: EventEmitter<any>; private readonly modelChanged;
private readonly debouncer;
connectors: ConnectorsModel; connectors: ConnectorsModel;
nodes: NodesModel; nodes: NodesModel;
edges: EdgesModel; 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