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",
"version":1,

View File

@ -15,6 +15,7 @@ export class AceEditorBase {
cutBuffer: string = "";
timerId: number = -1;
activeFile!: NewtonFile;
isDefault: boolean = false;
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() {
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 {
if (this.isDefault) {
this.addActiveStyling();
}
this.loadAce();
}

View File

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

View File

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

View File

@ -11,4 +11,4 @@
.ace_autocomplete {
background-color: #25282c !important;
}
}

View File

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