@@ -9,14 +9,14 @@ const SVG_NAMESPACE = 'http://www.w3.org/2000/svg';
9
9
10
10
export default class BubbleSetsPlugin {
11
11
readonly svg : SVGSVGElement ;
12
- readonly #paths : BubbleSetPath [ ] = [ ] ;
12
+ readonly #layers : BubbleSetPath [ ] = [ ] ;
13
13
readonly #adapter = {
14
14
remove : ( path : BubbleSetPath ) => {
15
- const index = this . #paths . indexOf ( path ) ;
15
+ const index = this . #layers . indexOf ( path ) ;
16
16
if ( index < 0 ) {
17
17
return false ;
18
18
}
19
- this . #paths . splice ( index , 1 ) ;
19
+ this . #layers . splice ( index , 1 ) ;
20
20
return true ;
21
21
} ,
22
22
} ;
@@ -51,7 +51,7 @@ export default class BubbleSetsPlugin {
51
51
} ;
52
52
53
53
destroy ( ) {
54
- for ( const path of this . #paths ) {
54
+ for ( const path of this . #layers ) {
55
55
path . remove ( ) ;
56
56
}
57
57
this . #cy. off ( 'viewport' , undefined , this . zoomed ) ;
@@ -75,20 +75,20 @@ export default class BubbleSetsPlugin {
75
75
avoidNodes ?? this . #cy. collection ( ) ,
76
76
Object . assign ( { } , this . #options, options )
77
77
) ;
78
- this . #paths . push ( path ) ;
79
- if ( this . #paths . length === 1 ) {
78
+ this . #layers . push ( path ) ;
79
+ if ( this . #layers . length === 1 ) {
80
80
this . zoomed ( ) ;
81
81
}
82
82
path . update ( ) ;
83
83
return path ;
84
84
}
85
85
86
86
getPaths ( ) {
87
- return this . #paths . slice ( ) ;
87
+ return this . #layers . slice ( ) ;
88
88
}
89
89
90
90
removePath ( path : BubbleSetPath ) {
91
- const i = this . #paths . indexOf ( path ) ;
91
+ const i = this . #layers . indexOf ( path ) ;
92
92
if ( i < 0 ) {
93
93
return false ;
94
94
}
@@ -104,7 +104,7 @@ export default class BubbleSetsPlugin {
104
104
105
105
update ( ) {
106
106
this . zoomed ( ) ;
107
- this . #paths . forEach ( ( p ) => p . update ( ) ) ;
107
+ this . #layers . forEach ( ( p ) => p . update ( ) ) ;
108
108
}
109
109
}
110
110
0 commit comments