[#181] handle checkmarks on window resizing

This commit is contained in:
Robin Scholtes 2023-04-26 23:16:28 +12:00
parent 5e9aa5cd09
commit 5d82ca66f3
3 changed files with 15 additions and 2 deletions

View file

@ -881,6 +881,18 @@ class App {
} }
} }
} }
setDesktopUI(minimise){
this.setDesktopLayout(minimise);
// we don't want to display any checkmarks on desktop, so we clear them
this.manager.recipe.clearAllSelectedClasses();
}
setMobileUI(){
this.setMobileLayout();
// on window resizing below breakpoint, we want to put the checkmarks back
this.manager.recipe.updateSelectedOperations();
}
} }
export default App; export default App;

View file

@ -22,6 +22,7 @@
### Misc: ### Misc:
- Gruntfile revert dev config - Gruntfile revert dev config
- check for lingering @TODO across code
- comb through CSS and improve organisation for better DevX. Ask repo owners to open another issue perhaps and just redo all of the stylesheets ( preferably with SASS ) - comb through CSS and improve organisation for better DevX. Ask repo owners to open another issue perhaps and just redo all of the stylesheets ( preferably with SASS )
- delete this file when done :) - delete this file when done :)

View file

@ -28,9 +28,9 @@ class WindowWaiter {
*/ */
windowResize() { windowResize() {
if ( window.innerWidth >= this.app.breakpoint ) { if ( window.innerWidth >= this.app.breakpoint ) {
this.app.setDesktopLayout(false); //@TODO: use setDesktopUI() func this.app.setDesktopUI(false);
} else { } else {
this.app.setMobileLayout(); //@TODO: use mobileUI() if needed this.app.setMobileUI();
} }
debounce(this.app.adjustComponentSizes, 200, "windowResize", this.app, [])(); debounce(this.app.adjustComponentSizes, 200, "windowResize", this.app, [])();