File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -93,7 +93,9 @@ export default {
93
93
methods: {
94
94
toggleEventListener () {
95
95
const listener = this .enabled ? document .body .addEventListener : document .body .removeEventListener
96
+
96
97
listener? .call (document .body , ' mousemove' , this .updateLinkParams )
98
+ listener? .call (document .body , ' resize' , this .closeOverlay , true )
97
99
listener? .call (document .body , ' click' , this .handleClick , true )
98
100
},
99
101
toggleEnabled () {
@@ -179,15 +181,18 @@ export default {
179
181
this .linkParams = params
180
182
}
181
183
else {
182
- this .overlayVisible = false
183
- this .linkParams = {
184
- file: ' ' ,
185
- line: 0 ,
186
- column: 0 ,
187
- }
184
+ this .closeOverlay ()
188
185
}
189
186
this .onUpdated ()
190
187
},
188
+ closeOverlay () {
189
+ this .overlayVisible = false
190
+ this .linkParams = {
191
+ file: ' ' ,
192
+ line: 0 ,
193
+ column: 0 ,
194
+ }
195
+ },
191
196
192
197
// Public methods
193
198
enable () {
You can’t perform that action at this time.
0 commit comments