Updated editor height; visualized which is active

This commit is contained in:
itdominator 2025-06-11 23:02:45 -05:00
parent 71d3dc2573
commit dbbc6deaae
8 changed files with 30 additions and 12 deletions

View File

@ -1,3 +1,7 @@
/* Using older build flow b/c of this issue:
https://github.com/issues/created?issue=mkslanc%7Cace-linters%7C172
*/
{ {
"$schema":"./node_modules/@angular/cli/lib/config/schema.json", "$schema":"./node_modules/@angular/cli/lib/config/schema.json",
"version":1, "version":1,

View File

@ -15,6 +15,7 @@ export class AceEditorBase {
cutBuffer: string = ""; cutBuffer: string = "";
timerId: number = -1; timerId: number = -1;
activeFile!: NewtonFile; activeFile!: NewtonFile;
isDefault: boolean = false;
constructor( constructor(
@ -23,6 +24,14 @@ export class AceEditorBase {
} }
public addActiveStyling() {
this.editorElm.nativeElement.classList.add("active-editor")
}
public removeActiveStyling() {
this.editorElm.nativeElement.classList.remove("active-editor")
}
protected search() { protected search() {
console.log(this.editor.getSession()["$modeId"]) console.log(this.editor.getSession()["$modeId"])
} }

View File

@ -21,3 +21,8 @@
} }
.active-editor {
border-style: solid;
border-width: thin;
border-color: rgba(124, 124, 124, 1);
}

View File

@ -35,6 +35,10 @@ export class AceEditorComponent extends AceEditorBase {
public ngAfterViewInit(): void { public ngAfterViewInit(): void {
if (this.isDefault) {
this.addActiveStyling();
}
this.loadAce(); this.loadAce();
} }

View File

@ -1,3 +1,3 @@
.dropzone { .dropzone {
height: 80vh; height: 95vh;
} }

View File

@ -52,8 +52,10 @@ export class EditorsComponent {
this.loadSubscribers(); this.loadSubscribers();
this.loadMainSubscribers(); this.loadMainSubscribers();
let editor = this.createEditor(); let editor = this.createEditor();
this.activeEditor = editor.instance.uuid; this.activeEditor = editor.instance.uuid;
editor.instance.isDefault = true;
this.createEditor(); this.createEditor();
} }
@ -61,7 +63,9 @@ export class EditorsComponent {
this.editorsService.newActiveEditor$().pipe( this.editorsService.newActiveEditor$().pipe(
takeUntil(this.unsubscribe) takeUntil(this.unsubscribe)
).subscribe((uuid: string) => { ).subscribe((uuid: string) => {
this.editors.get(this.activeEditor).instance.removeActiveStyling();
this.activeEditor = uuid; this.activeEditor = uuid;
this.editors.get(this.activeEditor).instance.addActiveStyling();
}); });
this.editorsService.loadTabToEditor$().pipe( this.editorsService.loadTabToEditor$().pipe(

View File

@ -28,14 +28,6 @@ body {
} }
/*
.tab {
float: left;
clear: left;
display: contents;
}
*/
.tab { .tab {
display: flex; display: flex;
overflow: auto; overflow: auto;