This commit is contained in:
parent
dd2079b975
commit
3c164581ce
7 changed files with 34 additions and 34 deletions
|
@ -49,7 +49,7 @@ function getOverlappingContainers(
|
|||
containers: IContainerModel[]
|
||||
): IContainerModel[] {
|
||||
const min1 = container.properties.x;
|
||||
const max1 = container.properties.x + Number(container.properties.width);
|
||||
const max1 = container.properties.x + container.properties.width;
|
||||
const overlappingContainers: IContainerModel[] = [];
|
||||
for (const other of containers) {
|
||||
if (other === container) {
|
||||
|
@ -57,7 +57,7 @@ function getOverlappingContainers(
|
|||
}
|
||||
|
||||
const min2 = other.properties.x;
|
||||
const max2 = other.properties.x + Number(other.properties.width);
|
||||
const max2 = other.properties.x + other.properties.width;
|
||||
const isOverlapping = Math.min(max1, max2) - Math.max(min1, min2) > 0;
|
||||
|
||||
if (!isOverlapping) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue