Revert "don't need to set width with javascript?"
This reverts commit a2cf641c0e
.
This commit is contained in:
parent
70eebc978f
commit
d14dd777b7
2 changed files with 3 additions and 1 deletions
|
@ -70,7 +70,6 @@ limitations under the License.
|
||||||
z-index: 1; // over top of other elements, but still under the ones in the visible list
|
z-index: 1; // over top of other elements, but still under the ones in the visible list
|
||||||
height: 32px; // to match the header container
|
height: 32px; // to match the header container
|
||||||
// width set by JS
|
// width set by JS
|
||||||
width: calc(100% - 22px);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&.mx_RoomSublist2_headerContainer_stickyBottom {
|
&.mx_RoomSublist2_headerContainer_stickyBottom {
|
||||||
|
|
|
@ -125,11 +125,13 @@ export default class LeftPanel2 extends React.Component<IProps, IState> {
|
||||||
if (slRect.top + headerHeight > bottom && !gotBottom) {
|
if (slRect.top + headerHeight > bottom && !gotBottom) {
|
||||||
header.classList.add("mx_RoomSublist2_headerContainer_sticky");
|
header.classList.add("mx_RoomSublist2_headerContainer_sticky");
|
||||||
header.classList.add("mx_RoomSublist2_headerContainer_stickyBottom");
|
header.classList.add("mx_RoomSublist2_headerContainer_stickyBottom");
|
||||||
|
header.style.width = `${headerStickyWidth}px`;
|
||||||
header.style.removeProperty("top");
|
header.style.removeProperty("top");
|
||||||
gotBottom = true;
|
gotBottom = true;
|
||||||
} else if ((slRect.top - (headerHeight / 3)) < top) {
|
} else if ((slRect.top - (headerHeight / 3)) < top) {
|
||||||
header.classList.add("mx_RoomSublist2_headerContainer_sticky");
|
header.classList.add("mx_RoomSublist2_headerContainer_sticky");
|
||||||
header.classList.add("mx_RoomSublist2_headerContainer_stickyTop");
|
header.classList.add("mx_RoomSublist2_headerContainer_stickyTop");
|
||||||
|
header.style.width = `${headerStickyWidth}px`;
|
||||||
header.style.top = `${rlRect.top}px`;
|
header.style.top = `${rlRect.top}px`;
|
||||||
if (lastTopHeader) {
|
if (lastTopHeader) {
|
||||||
lastTopHeader.style.display = "none";
|
lastTopHeader.style.display = "none";
|
||||||
|
@ -141,6 +143,7 @@ export default class LeftPanel2 extends React.Component<IProps, IState> {
|
||||||
header.classList.remove("mx_RoomSublist2_headerContainer_sticky");
|
header.classList.remove("mx_RoomSublist2_headerContainer_sticky");
|
||||||
header.classList.remove("mx_RoomSublist2_headerContainer_stickyTop");
|
header.classList.remove("mx_RoomSublist2_headerContainer_stickyTop");
|
||||||
header.classList.remove("mx_RoomSublist2_headerContainer_stickyBottom");
|
header.classList.remove("mx_RoomSublist2_headerContainer_stickyBottom");
|
||||||
|
header.style.removeProperty("width");
|
||||||
header.style.removeProperty("top");
|
header.style.removeProperty("top");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue