fix modal dialog for small windows. better onresize handling for sliders and modals
This commit is contained in:
parent
746012b53b
commit
4c7c05037b
4 changed files with 29 additions and 8 deletions
|
|
@ -1059,7 +1059,18 @@
|
|||
controller = settings().controller,
|
||||
dark = controller.dark;
|
||||
|
||||
WIN.addEventListener("resize", API.dialog.update);
|
||||
WIN.addEventListener("resize", () => {
|
||||
API.event.emit('resize');
|
||||
});
|
||||
|
||||
API.event.on('resize', () => {
|
||||
if (WIN.innerHeight < 800) {
|
||||
UI.modalBox.classList.add('mh85');
|
||||
} else {
|
||||
UI.modalBox.classList.remove('mh85');
|
||||
}
|
||||
API.view.update_slider();
|
||||
});
|
||||
|
||||
SPACE.showSkyGrid(false);
|
||||
SPACE.setSkyColor(dark ? 0 : 0xffffff);
|
||||
|
|
@ -1090,6 +1101,7 @@
|
|||
nozzle: $('lt-nozzle'),
|
||||
|
||||
modal: $('modal'),
|
||||
modalBox: $('modal-box'),
|
||||
help: $('mod-help'),
|
||||
setup: $('mod-setup'),
|
||||
tools: $('mod-tools'),
|
||||
|
|
|
|||
Loading…
Reference in a new issue