mng / ngx-resizable

Resizable Split Pane Layout
https://3dgenomes.github.io/ngx-resizable/
MIT License
22 stars 15 forks source link

Not able to set boundry for bottom and top #15

Open bajrang87 opened 4 years ago

bajrang87 commented 4 years ago

I need to restrict user should not able to resize extreme end of browser window, we should be able to set some margin around 100px from bottom of screen, similarly on top as well. So user will not be able to go beyond screen of bottom and top. Please provide a way if we have any mechanism to set it.

Thanks, Bajrang

TheMelmacian commented 2 years ago

I know it is over a year since this question was asked but I started to use ngx-resizable only recently and solved this problem with simple css.

Based on the official example with 4x4 cells with the default layout:

.content {
    height: 100vh;
}
.row {
    min-height: 100px;
    max-height: calc(100vh - 100px);
}
.cell {
    min-width: 100px;
    max-width: calc(100vw - 100px);
}

For the column layout you have to switch the rules for cells and rows.