You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-08 21:42:24 +03:00
introduce resizeFromContainerOffset method on distributor
up till now, resize received the offset of the resize handle within the container upon resizing, and would then calculate it's new size. For this first item in the container, this is the same, and has therefor not been a problem yet. Now however, we'll need to be able to programatically (from localStorage) set the size of any roomsublist, so need a method we can call with just the size and not an offset within the container. The resizer calls the new method, which subsequently calls resize. This also has the nice side-effect that you can now easily call super.resize after having transformed the new item size
This commit is contained in:
@@ -88,7 +88,7 @@ export class Resizer {
|
||||
|
||||
const onMouseMove = (event) => {
|
||||
const offset = sizer.offsetFromEvent(event);
|
||||
distributor.resize(offset);
|
||||
distributor.resizeFromContainerOffset(offset);
|
||||
};
|
||||
|
||||
const body = document.body;
|
||||
|
||||
Reference in New Issue
Block a user