Skip to content

Commit 3a15481

Browse files
committed
improve editor layout
1 parent 1aab49c commit 3a15481

File tree

2 files changed

+11
-14
lines changed

2 files changed

+11
-14
lines changed

src/editor/ReactWebView.ts

+5-14
Original file line numberDiff line numberDiff line change
@@ -50,20 +50,12 @@ class ReactWebView {
5050
// vscode.commands.executeCommand('coderoad.open_webview')
5151
// }
5252

53-
// // prevents new panels from going on top of coderoad panel
54-
vscode.window.onDidChangeActiveTextEditor((textEditor?: vscode.TextEditor) => {
55-
console.log('onDidChangeActiveTextEditor')
56-
console.log(textEditor)
57-
// if (!textEditor || textEditor.viewColumn !== vscode.ViewColumn.Two) {
58-
// updateWindows()
59-
// }
60-
})
6153
// // // prevents moving coderoad panel on top of left panel
62-
vscode.window.onDidChangeVisibleTextEditors((textEditor: vscode.TextEditor[]) => {
63-
console.log('onDidChangeVisibleTextEditors')
64-
console.log(textEditor)
65-
// updateWindows()
66-
})
54+
// vscode.window.onDidChangeVisibleTextEditors((textEditors: vscode.TextEditor[]) => {
55+
// console.log('onDidChangeVisibleTextEditors')
56+
// console.log(textEditors)
57+
// // updateWindows()
58+
// })
6759

6860
// TODO: prevent window from moving to the left when no windows remain on rights
6961

@@ -83,7 +75,6 @@ class ReactWebView {
8375
}
8476

8577
public createOrShow(): void {
86-
// reset layout
8778
vscode.commands.executeCommand('vscode.setEditorLayout', {
8879
orientation: 0,
8980
groups: [{groups: [{}], size: 0.6}, {groups: [{}], size: 0.4}],

src/editor/index.ts

+6
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ class Editor {
1111
console.log('ACTIVATE!')
1212
this.vscodeExt = vscodeExt
1313

14+
// set out 60/40 layout
15+
vscode.commands.executeCommand('vscode.setEditorLayout', {
16+
orientation: 0,
17+
groups: [{groups: [{}], size: 0.6}, {groups: [{}], size: 0.4}],
18+
})
19+
1420
// commands
1521
this.activateCommands()
1622

0 commit comments

Comments
 (0)