mirror of
https://github.com/avatao-content/frontend-tutorial-framework
synced 2024-12-05 02:11:32 +00:00
Fix monaco editor overflowing from container (partial)
This commit is contained in:
parent
0fbaf2275e
commit
0fc90126a7
@ -93,8 +93,8 @@ export class DashboardComponent implements OnInit, OnDestroy {
|
||||
|
||||
setLayout(layout: string) {
|
||||
this.layout = layout;
|
||||
// We need to trigger a 'resize' event manually, otherwise ace editor stays collapsed
|
||||
// Ace editors 'resize' event listener requires a parameter of force=true
|
||||
// We need to trigger a 'resize' event manually, otherwise editor stays collapsed
|
||||
// editor 'resize' event listener requires a parameter of force=true
|
||||
setTimeout(() => window.dispatchEvent(new Event('resize', {force: true} as any)), 0);
|
||||
}
|
||||
|
||||
|
@ -37,17 +37,10 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--div (keyup)="setCodeState(CodeState.DIRTY); setDeployButtonState(DeployButtonState.TODEPLOY); resetAutoSaveCountdown()"
|
||||
ace-editor
|
||||
[(text)]="code"
|
||||
[mode]="language"
|
||||
[theme]="theme"
|
||||
[options]="options"
|
||||
class="tfw-ace-editor">
|
||||
</div-->
|
||||
|
||||
<ngx-monaco-editor [(ngModel)]="code"
|
||||
class="tfw-ace-editor"
|
||||
(keyup)="setCodeState(CodeState.DIRTY); setDeployButtonState(DeployButtonState.TODEPLOY); resetAutoSaveCountdown()"
|
||||
class="tfw-ide-editor"
|
||||
(keyup)="setCodeState(CodeState.DIRTY);
|
||||
setDeployButtonState(DeployButtonState.TODEPLOY);
|
||||
resetAutoSaveCountdown()"
|
||||
[options]="editorOptions"
|
||||
></ngx-monaco-editor>
|
||||
|
@ -9,9 +9,10 @@
|
||||
grid-template-columns: 8fr 1fr;
|
||||
}
|
||||
|
||||
.tfw-ace-editor {
|
||||
.tfw-ide-editor {
|
||||
height: calc(100% - 67px);
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.btn-group {
|
||||
|
Loading…
Reference in New Issue
Block a user