checkpoint reflow

This commit is contained in:
Stewart Allen 2024-05-22 18:20:02 -04:00
commit 76171c2474
5 changed files with 345 additions and 297 deletions

View file

@ -961,8 +961,8 @@ gapp.register("kiri.main", [], (root, exports) => {
}
function setControlsVisible(show) {
$('mid-lcol').style.display = show ? 'flex' : 'none';
$('mid-rcol').style.display = show ? 'flex' : 'none';
$('mid-left').style.display = show ? 'flex' : 'none';
$('mid-right').style.display = show ? 'flex' : 'none';
}
function downloadBlob(data, filename) {

View file

@ -80,10 +80,13 @@ gapp.register("kiri.ui", [], (root, exports) => {
alert,
onBlur,
setVisible(el, bool) {
kiri.ui.setClass(el, 'hide', bool);
},
setClass(el, clazz, bool) {
if (bool) {
el.classList.remove('hide');
el.classList.remove(clazz);
} else {
el.classList.add('hide');
el.classList.add(clazz);
}
}
};