#rl-content to use flex for better layout control

This commit is contained in:
the-djmaze 2023-01-26 14:11:30 +01:00
parent cfcc8c73af
commit 8047a36b70
8 changed files with 42 additions and 70 deletions

View file

@ -199,7 +199,7 @@ showMessageComposer = (params = []) =>
setLayoutResizer = (source, target, sClientSideKeyName, mode) =>
{
if (source.layoutResizer && source.layoutResizer.mode != mode) {
target.removeAttribute('style');
target?.removeAttribute('style');
source.removeAttribute('style');
}
source.observer?.disconnect();
@ -210,10 +210,10 @@ setLayoutResizer = (source, target, sClientSideKeyName, mode) =>
let value;
if ('Width' == mode) {
value = source.offsetWidth;
target.style.left = value + 'px';
target && (target.style.left = value + 'px');
} else {
value = source.offsetHeight;
target.style.top = (4 + source.offsetTop + value) + 'px';
target && (target.style.top = value + 'px');
}
return value;
};