Properly use item container

This commit is contained in:
Dariusz Niemczyk 2021-08-24 13:08:31 +02:00
parent a5c005756e
commit 41d444d7d7
No known key found for this signature in database
GPG key ID: 3E8DC619E3C59A05

View file

@ -178,8 +178,9 @@ export default class Resizer<C extends IConfig = IConfig> {
const vertical = resizeHandle.classList.contains(this.classNames.vertical); const vertical = resizeHandle.classList.contains(this.classNames.vertical);
const reverse = this.isReverseResizeHandle(resizeHandle); const reverse = this.isReverseResizeHandle(resizeHandle);
const Distributor = this.distributorCtor; const Distributor = this.distributorCtor;
const useItemContainer = this.config && this.config.handler ? this.container : undefined;
const sizer = Distributor.createSizer(this.container, vertical, reverse); const sizer = Distributor.createSizer(this.container, vertical, reverse);
const item = Distributor.createItem(resizeHandle, this, sizer, this.container); const item = Distributor.createItem(resizeHandle, this, sizer, useItemContainer);
const distributor = new Distributor(item); const distributor = new Distributor(item);
return { sizer, distributor }; return { sizer, distributor };
} }