File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change 97
97
}
98
98
self . y = y
99
99
self . _reloading = false
100
+ if ( ! self . connected ) {
101
+ self . y . disconnect ( )
102
+ }
100
103
if ( self . closed ) {
101
104
self . close ( )
102
105
} else {
136
139
self . queueReload ( )
137
140
} )
138
141
} ,
142
+ attached : function ( ) {
143
+ this . closed = false
144
+ } ,
145
+ detached : function ( ) {
146
+ this . closed = true
147
+ } ,
148
+ _connectedChanged : function ( connected ) {
149
+ if ( this . y != null ) {
150
+ if ( connected ) {
151
+ this . y . reconnect ( )
152
+ } else {
153
+ this . y . disconnect ( )
154
+ }
155
+ }
156
+ } ,
139
157
is : 'y-element' ,
140
158
properties : {
159
+ connected : {
160
+ type : Boolean ,
161
+ notify : true ,
162
+ value : true ,
163
+ observer : '_connectedChanged'
164
+ } ,
141
165
connector : {
142
166
type : Object ,
143
167
notify : true ,
You can’t perform that action at this time.
0 commit comments