mirror of
https://github.com/avatao-content/frontend-tutorial-framework
synced 2024-12-05 02:31:33 +00:00
Refactor editor write handler to a seperate method
This commit is contained in:
parent
0fc90126a7
commit
8f19bf3661
@ -39,8 +39,6 @@
|
||||
|
||||
<ngx-monaco-editor [(ngModel)]="code"
|
||||
class="tfw-ide-editor"
|
||||
(keyup)="setCodeState(CodeState.DIRTY);
|
||||
setDeployButtonState(DeployButtonState.TODEPLOY);
|
||||
resetAutoSaveCountdown()"
|
||||
(keyup)="editorWriteHanlder()"
|
||||
[options]="editorOptions"
|
||||
></ngx-monaco-editor>
|
||||
|
@ -151,6 +151,12 @@ export class IdeComponent implements OnInit {
|
||||
this.requestCode();
|
||||
}
|
||||
|
||||
editorWriteHanlder() {
|
||||
this.setCodeState(CodeState.DIRTY);
|
||||
this.setDeployButtonState(DeployButtonState.TODEPLOY);
|
||||
this.resetAutoSaveCountdown();
|
||||
}
|
||||
|
||||
setCodeState(state: CodeState) {
|
||||
this.codeState = state;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user