mirror of
https://github.com/gchq/CyberChef.git
synced 2025-05-09 15:55:01 -04:00
add function to check for window width and use that throughout the app for more convenient future use
This commit is contained in:
parent
6a1514db30
commit
df781bec00
6 changed files with 11 additions and 8 deletions
|
@ -50,6 +50,9 @@ class App {
|
|||
this.breakpoint = 768;
|
||||
}
|
||||
|
||||
isMobileView() {
|
||||
return window.innerWidth < this.breakpoint;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function sets up the stage and creates listeners for all events.
|
||||
|
@ -297,7 +300,7 @@ class App {
|
|||
* @param {boolean} [minimise=false] - Set this flag if attempting to minimise frames to 0 width
|
||||
*/
|
||||
initialiseUI() {
|
||||
if (window.innerWidth < this.breakpoint) {
|
||||
if (this.isMobileView()) {
|
||||
this.setMobileUI();
|
||||
} else {
|
||||
this.setDesktopUI(false);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue