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:
parent
3e496833fc
commit
dae509d0eb
3 changed files with 23 additions and 17 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue