try clear next item size when resizing so there is always one unsized item

This commit is contained in:
Bruno Windels 2019-01-10 14:05:00 +01:00
parent 1a2727f0af
commit a130c44803
3 changed files with 55 additions and 9 deletions

View file

@ -64,6 +64,14 @@ export class Sizer {
}
}
clearItemSize(item) {
if (this.vertical) {
item.style.height = null;
} else {
item.style.width = null;
}
}
/**
@param {MouseEvent} event the mouse event
@return {number} the distance between the cursor and the edge of the container,