|
1 | | -<mat-sidenav-container> |
2 | | - <mat-sidenav-content> |
| 1 | +<section> |
| 2 | + <aside> |
| 3 | + <div class="config-panel"> |
| 4 | + <h4>Code Editor Config</h4> |
| 5 | + <gui-form [config]="config" [model]="options" [form]="form" /> |
| 6 | + </div> |
| 7 | + </aside> |
3 | 8 |
|
4 | | - <mtx-split direction="vertical"> |
5 | | - <mtx-split-pane> |
| 9 | + <div> |
| 10 | + <h4> |
| 11 | + <button mat-button (click)="showOutput=!showOutput">Toggle output</button> |
| 12 | + </h4> |
| 13 | + <div class="editor-wrap"> |
| 14 | + <code-editor #editor |
| 15 | + [style.height]="'500px'" |
| 16 | + [(ngModel)]="code" |
| 17 | + (ngModelChange)="log($event)" |
| 18 | + [theme]="options.theme" |
| 19 | + [setup]="options.setup" |
| 20 | + [disabled]="options.disabled" |
| 21 | + [readonly]="options.readonly" |
| 22 | + [placeholder]="options.placeholder" |
| 23 | + [indentWithTab]="options.indentWithTab" |
| 24 | + [indentUnit]="options.indentUnit" |
| 25 | + [lineWrapping]="options.lineWrapping" |
| 26 | + [highlightWhitespace]="options.highlightWhitespace" |
| 27 | + [language]="options.language" |
| 28 | + [languages]="languages" /> |
6 | 29 |
|
7 | | - <mtx-split> |
8 | | - <mtx-split-pane> |
9 | | - <code-editor #editor |
10 | | - [style.height]="options.height.value+options.height.unit" |
11 | | - [(ngModel)]="code" |
12 | | - (ngModelChange)="log($event)" |
13 | | - [theme]="options.theme" |
14 | | - [setup]="options.setup" |
15 | | - [disabled]="options.disabled" |
16 | | - [readonly]="options.readonly" |
17 | | - [placeholder]="options.placeholder" |
18 | | - [indentWithTab]="options.indentWithTab" |
19 | | - [indentUnit]="options.indentUnit" |
20 | | - [lineWrapping]="options.lineWrapping" |
21 | | - [highlightWhitespace]="options.highlightWhitespace" |
22 | | - [language]="options.language" |
23 | | - [languages]="languages" /> |
24 | | - </mtx-split-pane> |
| 30 | + @if (showOutput) { |
| 31 | + <textarea [style.height]="'500px'" [(ngModel)]="code"></textarea> |
| 32 | + } |
| 33 | + </div> |
25 | 34 |
|
26 | | - <mtx-split-pane> |
27 | | - <textarea [style.height]="options.height.value+options.height.unit" |
28 | | - [(ngModel)]="code"></textarea> |
29 | | - </mtx-split-pane> |
30 | | - </mtx-split> |
| 35 | + <h4>Unified diff-editor</h4> |
| 36 | + <code-editor #editor |
| 37 | + [style.height]="'500px'" |
| 38 | + [value]="modifiedCode" |
| 39 | + [theme]="options.theme" |
| 40 | + [setup]="options.setup" |
| 41 | + [readonly]="options.readonly" |
| 42 | + [placeholder]="options.placeholder" |
| 43 | + [indentWithTab]="options.indentWithTab" |
| 44 | + [indentUnit]="options.indentUnit" |
| 45 | + [lineWrapping]="options.lineWrapping" |
| 46 | + [highlightWhitespace]="options.highlightWhitespace" |
| 47 | + [extensions]="unifiedExts" /> |
| 48 | + </div> |
| 49 | +</section> |
31 | 50 |
|
32 | | - </mtx-split-pane> |
33 | | - <mtx-split-pane> |
| 51 | +<section> |
| 52 | + <aside> |
| 53 | + <div class="config-panel"> |
| 54 | + <h4>Diff Editor Config</h4> |
| 55 | + <gui-form [config]="config2" [model]="options2" /> |
| 56 | + </div> |
| 57 | + </aside> |
34 | 58 |
|
35 | | - <mtx-split> |
36 | | - <mtx-split-pane> |
37 | | - <code-editor #editor |
38 | | - [style.height]="options.height.value+options.height.unit" |
39 | | - [value]="modifiedCode" |
40 | | - [theme]="options.theme" |
41 | | - [setup]="options.setup" |
42 | | - [readonly]="options.readonly" |
43 | | - [placeholder]="options.placeholder" |
44 | | - [indentWithTab]="options.indentWithTab" |
45 | | - [indentUnit]="options.indentUnit" |
46 | | - [lineWrapping]="options.lineWrapping" |
47 | | - [highlightWhitespace]="options.highlightWhitespace" |
48 | | - [extensions]="unifiedExts" /> |
49 | | - |
50 | | - </mtx-split-pane> |
51 | | - <mtx-split-pane> |
52 | | - <diff-editor #editor |
53 | | - [style.height]="options.height.value+options.height.unit" |
54 | | - [originalValue]="originalCode" |
55 | | - [modifiedValue]="modifiedCode" |
56 | | - [orientation]="options2.orientation" |
57 | | - [revertControls]="options2.revertControls" |
58 | | - [highlightChanges]="options2.highlightChanges" |
59 | | - [gutter]="options2.gutter" /> |
60 | | - |
61 | | - </mtx-split-pane> |
62 | | - </mtx-split> |
63 | | - |
64 | | - </mtx-split-pane> |
65 | | - </mtx-split> |
66 | | - |
67 | | - </mat-sidenav-content> |
68 | | - |
69 | | - <mat-sidenav mode="side" position="end" opened> |
70 | | - <h4>Code Editor</h4> |
71 | | - <gui-form [config]="config" [model]="options" [form]="form" /> |
72 | | - <h4>Diff Editor</h4> |
73 | | - <gui-form [config]="config2" [model]="options2" /> |
74 | | - </mat-sidenav> |
75 | | -</mat-sidenav-container> |
| 59 | + <div> |
| 60 | + <h4>Split diff-editor</h4> |
| 61 | + <diff-editor #editor |
| 62 | + [style.height]="'100vh'" |
| 63 | + [originalValue]="originalCode" |
| 64 | + [modifiedValue]="modifiedCode" |
| 65 | + [orientation]="options2.orientation" |
| 66 | + [revertControls]="options2.revertControls" |
| 67 | + [highlightChanges]="options2.highlightChanges" |
| 68 | + [gutter]="options2.gutter" /> |
| 69 | + </div> |
| 70 | +</section> |
0 commit comments