-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(draw): Management of the editing of the labels (#1059)
* Merge branch 'DrawingGestionOnLabels' into DessinGestionDesEtiquettes * formatted the html * format ts file * Fixed some formatting issues * Redid design of the inputs box * Reformatting
- Loading branch information
1 parent
b922508
commit 2c039e2
Showing
9 changed files
with
408 additions
and
171 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,20 @@ | ||
<div mat-dialog-content> | ||
<p class="mat-typography">{{'igo.geo.draw.dialogInstruction' | translate}}</p> | ||
<p class="mat-typography"> | ||
{{ 'igo.geo.draw.dialogInstruction' | translate }} | ||
</p> | ||
<mat-form-field class="example-full-width"> | ||
<input | ||
#input | ||
matInput | ||
placeholder="{{'igo.geo.draw.dialogTitle' | translate}}" | ||
value="{{data.currentLabel}}"> | ||
placeholder="{{ 'igo.geo.draw.dialogTitle' | translate }}" | ||
value="{{ data.currentLabel }}"/> | ||
</mat-form-field> | ||
</div> | ||
<div mat-dialog-actions> | ||
<button | ||
mat-raised-button | ||
(click)="noLabel()">{{'igo.geo.draw.noLabel' | translate}} | ||
<button mat-raised-button (click)="cancelDrawing()"> | ||
{{ 'igo.geo.draw.cancel' | translate }} | ||
</button> | ||
<button | ||
mat-raised-button | ||
color="primary" | ||
[mat-dialog-close]="input.value">OK | ||
<button mat-raised-button color="primary" (click)="confirm(input.value)"> | ||
OK | ||
</button> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,28 @@ | ||
import { Component, Inject } from '@angular/core'; | ||
import { Component, Inject, Input } from '@angular/core'; | ||
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; | ||
|
||
export interface DialogData { | ||
label: string; | ||
} | ||
|
||
@Component({ | ||
selector: 'igo-draw-popup-component', | ||
templateUrl: './draw-popup.component.html', | ||
styleUrls: ['./draw-popup.component.scss'], | ||
}) | ||
export class DrawPopupComponent { | ||
selector: 'igo-draw-popup-component', | ||
templateUrl: './draw-popup.component.html', | ||
styleUrls: ['./draw-popup.component.scss'] | ||
}) | ||
export class DrawPopupComponent { | ||
@Input() confirmFlag: boolean = false; | ||
|
||
constructor( | ||
public dialogRef: MatDialogRef<DrawPopupComponent>, | ||
@Inject(MAT_DIALOG_DATA) public data: {currentLabel: string}) {} | ||
constructor( | ||
public dialogRef: MatDialogRef<DrawPopupComponent>, | ||
@Inject(MAT_DIALOG_DATA) public data: { currentLabel: string } | ||
) {} | ||
|
||
noLabel() { | ||
this.dialogRef.close(); | ||
} | ||
cancelDrawing() { | ||
this.dialogRef.close(); | ||
} | ||
confirm(labelString: string) { | ||
this.confirmFlag = true; | ||
this.dialogRef.close(labelString); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.