Logical like #169, move the judgment code to toggle
This commit is contained in:
+15
-2
@@ -92,9 +92,22 @@ class FullScreen {
|
||||
this.cancel(type);
|
||||
}
|
||||
else {
|
||||
this.request(type);
|
||||
switch (type) {
|
||||
case 'browser':
|
||||
this.request('browser');
|
||||
if (this.isFullScreen('web')) {
|
||||
this.cancel('web');
|
||||
}
|
||||
break;
|
||||
case 'web':
|
||||
this.request('web');
|
||||
if (this.isFullScreen('browser')) {
|
||||
this.cancel('browser');
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = FullScreen;
|
||||
module.exports = FullScreen;
|
||||
|
||||
Reference in New Issue
Block a user