fix(mongo-browser): increase default editor width and broaden resize range in Mongo browser pane
This commit is contained in:
@@ -25,7 +25,7 @@ export class TsviewMongoBrowser extends DeesElement {
|
||||
private accessor stats: ICollectionStats | null = null;
|
||||
|
||||
@state()
|
||||
private accessor editorWidth: number = 400;
|
||||
private accessor editorWidth: number = 700;
|
||||
|
||||
@state()
|
||||
private accessor isResizingEditor: boolean = false;
|
||||
@@ -117,7 +117,7 @@ export class TsviewMongoBrowser extends DeesElement {
|
||||
.content {
|
||||
flex: 1;
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 4px var(--editor-width, 400px);
|
||||
grid-template-columns: 1fr 4px var(--editor-width, 700px);
|
||||
gap: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
@@ -305,7 +305,7 @@ export class TsviewMongoBrowser extends DeesElement {
|
||||
const contentEl = this.shadowRoot?.querySelector('.content');
|
||||
if (!contentEl) return;
|
||||
const containerRect = contentEl.getBoundingClientRect();
|
||||
const newWidth = Math.min(Math.max(containerRect.right - e.clientX, 300), 700);
|
||||
const newWidth = Math.min(Math.max(containerRect.right - e.clientX, 250), 1000);
|
||||
this.editorWidth = newWidth;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user