mirror of
https://github.com/Novaloop-AG/healthchat-web.git
synced 2026-11-25 11:13:41 +00:00
Iterate the resizer
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
+11
-3
@@ -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