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.
2 parents e6567f6 + dc3ca7c commit b83f0daCopy full SHA for b83f0da
src/core/helpers/utils.ts
@@ -70,9 +70,12 @@ export function collides(l1: ILayoutItem, l2: ILayoutItem): boolean {
70
* @throws {Error} Empty layout.
71
*/
72
export function getFirstCollision(layout: TLayout, layoutItem: ILayoutItem): ILayoutItem | undefined {
73
- if(layout.length < 1) {
74
- throw new Error('Empty layout');
75
- }
+ // if layout doesnt have static item it will cause error
+ // cannot drag or do anything
+
76
+ // if(layout.length < 1) {
77
+ // throw new Error('Empty layout');
78
+ // }
79
80
for(let i = 0, len = layout.length; i < len; i++) {
81
if(collides(layout[i], layoutItem)) {
0 commit comments