File tree Expand file tree Collapse file tree 4 files changed +84
-36
lines changed
apps/minsky-electron/src/app/managers
libs/ui-components/src/lib/edit-group Expand file tree Collapse file tree 4 files changed +84
-36
lines changed Original file line number Diff line number Diff line change @@ -603,9 +603,9 @@ export class CommandsManager {
603
603
const type = await v . type ( ) ;
604
604
const local = await v . local ( ) ;
605
605
WindowManager . createPopupWindowWithRouting ( {
606
- width : 500 ,
607
- height : 650 ,
608
- title : `Edit ${ name } || ''}` ,
606
+ width : 400 ,
607
+ height : 500 ,
608
+ title : `Edit ${ name || '' } ` ,
609
609
url : `#/headless/menu/insert/create-variable?type=${ type } &name=${ encodeURIComponent ( name ) || '' } &isEditMode=true&local=${ local } ` ,
610
610
} ) ;
611
611
}
@@ -615,11 +615,12 @@ export class CommandsManager {
615
615
let width = 500 ;
616
616
switch ( classType ) {
617
617
case ClassType . Group :
618
- height = 240 ;
618
+ width = 400 ;
619
+ height = 130 ;
619
620
break ;
620
621
case ClassType . Operation :
621
- height = 250 ;
622
- width = 350 ;
622
+ height = 200 ;
623
+ width = 300 ;
623
624
break ;
624
625
case ClassType . UserFunction :
625
626
height = 250 ;
Original file line number Diff line number Diff line change @@ -590,12 +590,12 @@ export class ContextMenuManager {
590
590
let op = new OperationBase ( minsky . canvas . item ) ;
591
591
592
592
let portValues ;
593
- op . portValues ( ) .
593
+ await op . portValues ( ) .
594
594
then ( ( x ) => { portValues = x ; } ) .
595
595
catch ( ( x ) => { portValues = 'unknown' ; } ) ;
596
596
597
597
let menuItems = [
598
- new MenuItem ( { label : `Port values ${ portValues } } ` } ) ,
598
+ new MenuItem ( { label : `Port values ${ portValues } ` } ) ,
599
599
new MenuItem ( {
600
600
label : 'Edit' ,
601
601
click : async ( ) => {
Original file line number Diff line number Diff line change 1
- < div class ="form-wrapper ">
2
- < br />
3
-
4
- < form [formGroup] ="form ">
1
+ < form [formGroup] ="form ">
2
+ < div class ="form-body ">
5
3
< div class ="form-control ">
6
4
< label for ="name "> Name</ label >
7
5
< input type ="text " class ="name " id ="name " formControlName ="name " />
8
6
</ div >
9
7
10
8
< div class ="form-control ">
11
9
< label for ="rotation "> Rotation</ label >
12
- < input
13
- type ="text "
14
- class ="rotation "
15
- id ="rotation "
16
- formControlName ="rotation "
17
- />
10
+ < input type ="text " class ="rotation " id ="rotation " formControlName ="rotation " />
18
11
</ div >
12
+ </ div >
19
13
20
- < div class ="form-buttons ">
21
- < button mat-raised-button class ="btn cancel-btn " (click) ="closeWindow() ">
22
- Cancel
23
- </ button >
14
+ < div class ="form-buttons ">
15
+ < button
16
+ mat-raised-button
17
+ class ="btn cancel-btn "
18
+ (click) ="closeWindow() "
19
+ >
20
+ Cancel
21
+ </ button >
24
22
25
- < button
26
- mat-raised-button
27
- class ="btn ok-btn submit "
28
- type ="submit "
29
- (click) ="handleSave() "
30
- >
31
- OK
32
- </ button >
33
- </ div >
34
- </ form >
35
- </ div >
23
+ < button
24
+ mat-raised-button
25
+ class ="btn ok-btn submit "
26
+ type ="submit "
27
+ (click) ="handleSave() "
28
+ >
29
+ OK
30
+ </ button >
31
+ </ div >
32
+ </ form >
Original file line number Diff line number Diff line change @@ -4,6 +4,56 @@ select {
4
4
width : 125px ;
5
5
}
6
6
7
- button {
8
- margin : $margin ;
9
- }
7
+ form {
8
+ width : 100vw ;
9
+ height : 100vh ;
10
+
11
+ overflow : hidden ;
12
+
13
+ display : flex ;
14
+ flex-direction : column ;
15
+ justify-content : space-between ;
16
+ align-items : stretch ;
17
+
18
+ .form-title {
19
+ width : 100% ;
20
+
21
+ padding : 10px ;
22
+ display : flex ;
23
+ justify-content : center ;
24
+ align-items : center ;
25
+
26
+ font-weight : bold ;
27
+ }
28
+
29
+ .form-body {
30
+ padding : 10px ;
31
+
32
+ display : flex ;
33
+ flex-direction : column ;
34
+ justify-content : space-between ;
35
+ align-items : stretch ;
36
+
37
+ overflow-x : hidden ;
38
+ overflow-y : auto ;
39
+
40
+ .form-control {
41
+ display : flex ;
42
+ flex-direction : row ;
43
+ justify-content : center ;
44
+ align-items : center ;
45
+
46
+ * {
47
+ flex : 1 ;
48
+ max-width : 200px ;
49
+ }
50
+ }
51
+ }
52
+
53
+ .form-buttons {
54
+ margin : 0px ;
55
+ button {
56
+ margin : 5px ;
57
+ }
58
+ }
59
+ }
You can’t perform that action at this time.
0 commit comments