allow dark mode changes to be immediate and not require page reload

This commit is contained in:
Stewart Allen 2020-07-08 15:36:46 -04:00
commit c4bee0b762
3 changed files with 20 additions and 11 deletions

View file

@ -1017,10 +1017,12 @@
if (ctrl.dark) {
SPACE.platform.setGrid(gridMajor, gridMinor, 0x999999, 0x333333);
SPACE.platform.opacity(0.8);
SPACE.setSkyColor(0);
DOC.body.classList.add('dark');
} else {
SPACE.platform.setGrid(gridMajor, gridMinor, 0x999999, 0xcccccc);
SPACE.platform.opacity(0.3);
SPACE.setSkyColor(0xffffff);
DOC.body.classList.remove('dark');
}
SPACE.platform.setGZOff(height/2 - 0.1);