fix: extended droppable area on the top of dashboards (#11525)

* Extended droppable area on the top

* Empty dashboard detects almost whole area to place first element
This commit is contained in:
Kasia Kucharczyk 2020-11-09 02:35:39 +01:00 committed by GitHub
parent 849e7e9668
commit ea0abbffb4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 2 deletions

View File

@ -171,7 +171,7 @@ class DashboardGrid extends React.PureComponent {
))}
{/* make the area below components droppable */}
{editMode && (
{editMode && gridComponent.children.length > 0 && (
<DragDroppable
component={gridComponent}
depth={depth}

View File

@ -52,6 +52,12 @@
min-width: 16px;
}
.empty-droptarget:first-child {
.drop-indicator--bottom {
top: 24px;
}
}
.drop-indicator--right {
top: 0;
left: 100%;
@ -123,7 +129,12 @@
}
& > .empty-droptarget:first-child {
height: 24px;
height: 48px;
margin-top: -24px;
margin-bottom: -24px;
}
& > .empty-droptarget:only-child {
height: 80vh;
}
}