We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 87cdedb commit a747df5Copy full SHA for a747df5
src/gridstack-engine.ts
@@ -159,10 +159,11 @@ export class GridStackEngine {
159
}
160
161
let collide: GridStackNode;
162
+ let overMax = 0.5; // need >50%
163
collides.forEach(n => {
164
if (n.locked || !n._rect) return;
165
let r2 = n._rect; // overlapping target
- let yOver = Number.MAX_VALUE, xOver = Number.MAX_VALUE, overMax = 0.5; // need >50%
166
+ let yOver = Number.MAX_VALUE, xOver = Number.MAX_VALUE;
167
// depending on which side we started from, compute the overlap % of coverage
168
// (ex: from above/below we only compute the max horizontal line coverage)
169
if (r0.y < r2.y) { // from above
0 commit comments