You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-07 10:46:24 +03:00
Iterate the resizer
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
@@ -68,11 +68,19 @@ export default class Sizer {
|
||||
return offset;
|
||||
}
|
||||
|
||||
public setItemSize(item: HTMLElement, size: number) {
|
||||
public getDesiredItemSize(item: HTMLElement) {
|
||||
if (this.vertical) {
|
||||
item.style.height = `${Math.round(size)}px`;
|
||||
return item.style.height;
|
||||
} else {
|
||||
item.style.width = `${Math.round(size)}px`;
|
||||
return item.style.width;
|
||||
}
|
||||
}
|
||||
|
||||
public setItemSize(item: HTMLElement, size: string) {
|
||||
if (this.vertical) {
|
||||
item.style.height = size;
|
||||
} else {
|
||||
item.style.width = size;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user