diff --git a/Frontend Angular 4/src/app/layout/matefun/matefun.component.html b/Frontend Angular 4/src/app/layout/matefun/matefun.component.html index c1bcee035f4df31b7eb8399e31da8bf69cf424a9..8b7ff0a13c17c409c7bb8a4c0d2bfbf960d5885a 100755 --- a/Frontend Angular 4/src/app/layout/matefun/matefun.component.html +++ b/Frontend Angular 4/src/app/layout/matefun/matefun.component.html @@ -60,6 +60,11 @@ <input type="checkbox" style="width: 15px; display: inline-block;" name="argumentoI" class="form-control form-control-sm" [(ngModel)]=argumentoI> Mostrar advertencias de uso de operadores infijos </label> + <br> + <label> + <input type="checkbox" style="width: 15px; display: inline-block;" name="hintsCheck" class="form-control form-control-sm" [(ngModel)]=hintsCheck (change)="changeHints()"> + Mostrar sugerencias de autocompletar + </label> </div> <div class="form-group"> <button class="btn btn-secondary" (click)="saveConfig()">Guardar</button> diff --git a/Frontend Angular 4/src/app/layout/matefun/matefun.component.ts b/Frontend Angular 4/src/app/layout/matefun/matefun.component.ts index 7040c85b67e609f216938739cdd5714609a524be..f7b1144cb1281707c4dc46e7816fce8f74dcd54f 100755 --- a/Frontend Angular 4/src/app/layout/matefun/matefun.component.ts +++ b/Frontend Angular 4/src/app/layout/matefun/matefun.component.ts @@ -73,6 +73,7 @@ export class MateFunComponent { modificado = false; argumentoI = false; argumentoF = false; + hintsCheck = true; editableLoaded = false; editDialogFired = false; archivosTree :any; @@ -233,7 +234,12 @@ export class MateFunComponent { this.notifService.error(error); this.popover.close(); } - ); + ); + if (!this.hintsCheck){ + delete this.configCodeMirror.extraKeys["Ctrl-Space"]; + }else{ + this.configCodeMirror.extraKeys["Ctrl-Space"] = "autocomplete"; + } } aumentarFuente(){ @@ -418,7 +424,7 @@ export class MateFunComponent { } archivoModificado(event){ - if (!event.ctrlKey && !event.altKey){ + if (this.hintsCheck && !event.ctrlKey && !event.altKey){ if (/^[\w\_\d]$/.test(event.key) || event.key == 'Enter') this.codemirror.instance.showHint(event); if(this.copiaNombreArchivo!=this.archivo.nombre || this.copiaContenidoArchivo != this.archivo.contenido){ @@ -625,6 +631,4 @@ export class MateFunComponent { this.graph3DComp.onActivate(); } } - - }