Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
N
ngx-flowchart
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
HS-public
ngx-flowchart
Commits
3abd1987
Commit
3abd1987
authored
Nov 21, 2019
by
Igor Kulikov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix
parent
103be44b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
model.service.ts
projects/ngx-flowchart/src/lib/model.service.ts
+9
-3
No files found.
projects/ngx-flowchart/src/lib/model.service.ts
View file @
3abd1987
import
{
FcModelValidationService
}
from
'./modelvalidation.service'
;
import
{
FcModelValidationService
}
from
'./modelvalidation.service'
;
import
{
FcConnector
,
FcCoords
,
FcEdge
,
FcItemInfo
,
FcModel
,
FcNode
,
FcRectBox
}
from
'./ngx-flowchart.models'
;
import
{
FcConnector
,
FcCoords
,
FcEdge
,
FcItemInfo
,
FcModel
,
FcNode
,
FcRectBox
}
from
'./ngx-flowchart.models'
;
import
{
Observable
,
of
}
from
'rxjs'
;
import
{
Observable
,
of
,
Subject
}
from
'rxjs'
;
import
{
ChangeDetectorRef
,
EventEmitter
}
from
'@angular/core'
;
import
{
ChangeDetectorRef
,
EventEmitter
}
from
'@angular/core'
;
import
{
debounceTime
}
from
'rxjs/operators'
;
export
class
FcModelService
{
export
class
FcModelService
{
...
@@ -24,7 +25,8 @@ export class FcModelService {
...
@@ -24,7 +25,8 @@ export class FcModelService {
dropTargetId
:
string
;
dropTargetId
:
string
;
modelChanged
:
EventEmitter
<
any
>
;
private
readonly
modelChanged
:
EventEmitter
<
any
>
;
private
readonly
debouncer
=
new
Subject
<
any
>
();
connectors
:
ConnectorsModel
;
connectors
:
ConnectorsModel
;
nodes
:
NodesModel
;
nodes
:
NodesModel
;
...
@@ -61,10 +63,14 @@ export class FcModelService {
...
@@ -61,10 +63,14 @@ export 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
(()
=>
this
.
modelChanged
.
emit
());
}
}
public
notifyModelChanged
()
{
public
notifyModelChanged
()
{
this
.
modelChanged
.
emi
t
();
this
.
debouncer
.
nex
t
();
}
}
public
detectChanges
()
{
public
detectChanges
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment