Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(draw): Drawing coordinate label #1092

Merged
merged 98 commits into from
Nov 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
98 commits
Select commit Hold shift + click to select a range
3003237
Merge branch 'DrawingGestionOnLabels' into DessinGestionDesEtiquettes
kalvinkhuu May 19, 2022
f3ccf8d
Progress in the selection of the element
kalvinkhuu May 19, 2022
0fae04b
Working selection of an element for font size and font style
kalvinkhuu May 20, 2022
2f0a228
TODO next week
kalvinkhuu May 20, 2022
02122ee
Selection per element for the color works
kalvinkhuu May 24, 2022
0dec3ad
Working features
kalvinkhuu May 25, 2022
085a073
Partially clean it up
kalvinkhuu May 26, 2022
01fd889
Implemented edition of the position of label
kalvinkhuu May 27, 2022
6db4149
Cleaned up the code
kalvinkhuu May 30, 2022
f9a5962
Merge branch 'next' into DessinApplicationStyleParElement
kalvinkhuu May 30, 2022
c079c7f
Added a CSS style for the edition of the draw
kalvinkhuu May 31, 2022
7ade988
removed unused code
kalvinkhuu May 31, 2022
6adec56
Initial scrollbar for the table
kalvinkhuu Jun 1, 2022
43d72d1
Progress in table
kalvinkhuu Jun 2, 2022
fe09fda
Update entity-table.component.html
kalvinkhuu Jun 2, 2022
ffdc771
formatted the html
kalvinkhuu Jun 2, 2022
cfb4114
format ts file
kalvinkhuu Jun 2, 2022
d9acd2f
Fixed some formatting issues
kalvinkhuu Jun 3, 2022
dda2f4e
Merge branch 'next' into DessinGestionDesEtiquettes
kalvinkhuu Jun 3, 2022
eb6b73b
Redid design of the inputs box
kalvinkhuu Jun 3, 2022
a1af2d3
Merge branch 'DessinGestionDesEtiquettes' into DessinPlusieurCouches
kalvinkhuu Jun 3, 2022
e5dec48
updated format
kalvinkhuu Jun 3, 2022
3494302
Merge branch 'DessinPlusieurCouches' into DessinApplicationStyleParEl…
kalvinkhuu Jun 3, 2022
c3b5475
edit the formatting
kalvinkhuu Jun 3, 2022
039262a
Update package-lock.json
kalvinkhuu Jun 3, 2022
7a21537
Implemented a possible solution
kalvinkhuu Jun 3, 2022
afaba6c
Dynamic table height
kalvinkhuu Jun 6, 2022
82c3325
Update to fit 6 elements of the table
kalvinkhuu Jun 7, 2022
d5ea256
Cleaned up the code
kalvinkhuu Jun 7, 2022
f6b738b
Reformatting
kalvinkhuu Jun 7, 2022
351aed8
Merge remote-tracking branch 'origin/next' into DessinApplicationStyl…
kalvinkhuu Jun 8, 2022
06e4841
Merge branch 'next' into DessinApplicationStyleParElement
kalvinkhuu Jun 13, 2022
6585fb0
reformating
kalvinkhuu Jun 13, 2022
1acc629
Merge remote-tracking branch 'origin/next' into DessinApplicationStyl…
kalvinkhuu Jun 15, 2022
57a6be4
reformatting
kalvinkhuu Jun 15, 2022
266f6f0
Redid the files since next
kalvinkhuu Jun 21, 2022
bbd5ef2
UI modifications
kalvinkhuu Jun 21, 2022
eadb0a2
UI and logic changes
kalvinkhuu Jun 22, 2022
d829dc6
1.12.0
PhilippeLafreniere18 Jun 23, 2022
d8ad73c
Added a popup dialog
kalvinkhuu Jun 23, 2022
614935c
Added the json lines for the layer
kalvinkhuu Jun 27, 2022
76785d2
Update draw.component.ts
kalvinkhuu Jun 27, 2022
32331fe
Changed the logic
kalvinkhuu Jun 28, 2022
0bdca8f
Still does not retain the info
kalvinkhuu Jun 29, 2022
1b2fb9e
working logic with few bugs
kalvinkhuu Jun 30, 2022
2e16ec6
Made an Output and input for DC
kalvinkhuu Jul 4, 2022
1f4bf0a
Working prototype
kalvinkhuu Jul 5, 2022
62f854d
Merge branch 'master' into DessinPlusieurCouches2.0
kalvinkhuu Jul 5, 2022
bc87a8c
Merge branch 'next' into DessinPlusieurCouches2.0
kalvinkhuu Jul 5, 2022
fac624e
Cleaning the code
kalvinkhuu Jul 5, 2022
3fa842c
Update draw.component.ts
kalvinkhuu Jul 6, 2022
cbdf2c8
Requested changes
kalvinkhuu Jul 6, 2022
b077cf7
updateFrontend to getFeature
kalvinkhuu Jul 6, 2022
fae7ced
Update draw.component.ts
kalvinkhuu Jul 6, 2022
04f7fad
Fix bugs
kalvinkhuu Jul 7, 2022
9cfbd2a
Update draw.component.ts
kalvinkhuu Jul 7, 2022
dd18fa9
formatting
kalvinkhuu Jul 7, 2022
e6336af
Merge branch 'DessinApplicationStyleParElement' into DessinPlusieurCo…
kalvinkhuu Jul 7, 2022
8955d0b
Added logic to the toggles
kalvinkhuu Jul 7, 2022
94665d7
small changes
kalvinkhuu Jul 8, 2022
2920e62
initial changes
kalvinkhuu Jul 8, 2022
0e5e1db
Logic working with few bugs
kalvinkhuu Jul 11, 2022
92ae390
Merge branch 'DessinPlusieurCouches2.0' into DrawingCoordinateLabel
kalvinkhuu Jul 12, 2022
c89adcb
Working logic
kalvinkhuu Jul 12, 2022
2532e01
removed console
kalvinkhuu Jul 12, 2022
ff8c96f
Missing CSS edits
kalvinkhuu Jul 13, 2022
e125a0f
Working logic with editLabel
kalvinkhuu Jul 14, 2022
c628bc3
Added vocab and modified UI
kalvinkhuu Jul 18, 2022
675eba2
lint.fix
kalvinkhuu Jul 18, 2022
70eeacd
Changed logic and design
kalvinkhuu Jul 19, 2022
6d1ecf5
Updated the logic
kalvinkhuu Jul 21, 2022
7673b96
Small design and logic changes
kalvinkhuu Jul 21, 2022
b248e35
Popup measuring logic done
kalvinkhuu Jul 22, 2022
dc75a5a
UI changes
kalvinkhuu Jul 25, 2022
fe3c82c
measuring logic working
kalvinkhuu Jul 26, 2022
3ccdba0
Merge branch 'next' into DrawingCoordinateLabel
kalvinkhuu Jul 27, 2022
8c9d46c
lint fix
kalvinkhuu Jul 27, 2022
6959f67
started the Circle logic
kalvinkhuu Jul 27, 2022
28efbb4
Working logic for the circle length and area
kalvinkhuu Jul 28, 2022
62394b8
Circle logic works
kalvinkhuu Jul 29, 2022
0789f1a
working logic for coordinates and nicer UI
kalvinkhuu Aug 1, 2022
f6150a1
small changes
kalvinkhuu Aug 2, 2022
acf3bda
lint.fix
kalvinkhuu Aug 2, 2022
ff3254a
UI changes
kalvinkhuu Aug 3, 2022
c7d730a
final revisions hopefully
kalvinkhuu Aug 4, 2022
0215ba0
Added small changes
kalvinkhuu Aug 5, 2022
63fe55d
tests with the buffer
kalvinkhuu Aug 8, 2022
6de276e
removed the spacial
kalvinkhuu Aug 9, 2022
6bdb85b
some changes with the UI
kalvinkhuu Aug 10, 2022
7db6d9e
UI changes and final version
kalvinkhuu Aug 11, 2022
dc4fd10
update to 1.13.3
PhilippeLafreniere18 Nov 17, 2022
71931eb
lint
PhilippeLafreniere18 Nov 17, 2022
6d84823
fix(draw): css minor fix
PhilippeLafreniere18 Nov 17, 2022
2b9adca
Merge remote-tracking branch 'origin/next' into DrawingCoordinateLabel
PhilippeLafreniere18 Nov 23, 2022
24073e0
feat(draw): Allow area and length label por polygon, get draw label o…
PhilippeLafreniere18 Nov 28, 2022
6c619b1
fix(draw): keep 5 digits on coord/fix manage checkbox and area translate
PhilippeLafreniere18 Nov 29, 2022
972896a
feat(map.utils): add method to round coord and then convert to strinn…
Nov 30, 2022
278bd52
refactor(draw): use existing method to round coordinates
Nov 30, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,6 @@ td.edition {

input {
border-bottom: 1px solid darkgrey;
}
}


147 changes: 128 additions & 19 deletions packages/geo/src/lib/draw/draw/draw-popup.component.html
Original file line number Diff line number Diff line change
@@ -1,21 +1,130 @@
<div mat-dialog-content>
<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}}"/>
</mat-form-field>
<div>
<h2 mat-dialog-title>
{{ 'igo.geo.draw.popupTitle' | translate }}
</h2>
</div>
<div mat-dialog-actions>
<button
mat-raised-button
(click)="cancelDrawing()">{{'igo.geo.draw.cancel' | translate}}
</button>
<button
mat-raised-button
color="primary"
(click)="confirm(input.value)">OK
</button>


<div class="geometry-type-toggle mat-typography">
<mat-button-toggle-group
(change)="onLabelTypeChange($event.value)" [value]="customOrPredefined">
<mat-button-toggle [value]="labelType.Custom" >
{{ 'igo.geo.draw.labelType.custom' | translate }}
</mat-button-toggle>
<mat-button-toggle [value]="labelType.Predefined">
{{ 'igo.geo.draw.labelType.predefined' | translate }}
</mat-button-toggle>
</mat-button-toggle-group>
</div>

<div *ngIf="labelFlag !== labelType.Custom">
<div>
<p class="mat-typography">{{ 'igo.geo.draw.builtInInstructions' | translate }}</p>
<mat-radio-group *ngIf="olGeometryType !== 'Polygon'" class="mat-typography">
<mat-radio-button *ngFor="let option of arrayBuiltInType" [value]="option.value" [disabled]="optionAvailable(option.value)"
(change)="onLabelTypeChange($event.value)" [checked]="option.checked">
{{getProperLengthLabel(option.value)}}
</mat-radio-button>
</mat-radio-group>
<ng-container class="mat-typography" *ngIf="olGeometryType === 'Polygon'">
<mat-checkbox
*ngFor="let option of arrayBuiltInType"
class="mat-typography"
[value]="option.value"
[disabled]="optionAvailable(option.value)"
(change)="onLabelTypeChange($event.source.value, $event.checked)"
[checked]="option.checked">
{{getProperLengthLabel(option.value)}}
</mat-checkbox>
</ng-container>
<div *ngIf="labelFlag === labelType.Coordinates">
<mat-form-field class="readOnly-Input">
<input
#input
matInput
placeholder="(Latitude, Longitude)"
value="{{currentCoordinates}}" readonly>
</mat-form-field>
<mat-form-field class="unit-field">
<mat-select [value]="coordinatesMeasureUnit" (selectionChange)="onChangeCoordinateUnit($event.value)">
<mat-option *ngFor="let unit of allCoordinatesUnits" [value]="unit">
{{unit}}
</mat-option>
</mat-select>
</mat-form-field>
</div>
<div *ngIf="labelFlag === labelType.Length || polygonCheck === 2">
<mat-form-field class="readOnly-Input">
<input
#input
matInput
placeholder={{lengthLabelT}}
value="{{currentLength}}" readonly>
</mat-form-field>
<mat-form-field class="unit-field">
<mat-select [value]="lengthMeasureUnit" (selectionChange)="onChangeLengthUnit($event.value)">
<mat-option *ngFor="let unit of allLengthUnits" [value]="unit">
{{getLengthUnitEnum(unit)}}
</mat-option>
</mat-select>
</mat-form-field>
</div>
<div *ngIf="labelFlag === labelType.Area || polygonCheck === 2">
<mat-form-field class="readOnly-Input">
<input
#input
matInput
placeholder="{{ 'igo.geo.draw.labelType.Area' | translate }}"
value="{{currentArea}}" readonly>
</mat-form-field>
<mat-form-field class="unit-field">
<mat-select [value]="areaMeasureUnit" (selectionChange)="onChangeAreaUnit($event.value)">
<mat-option *ngFor="let unit of allAreaUnits" [value]="unit">
{{getAreaUnitEnum(unit)}}
</mat-option>
</mat-select>
</mat-form-field>
</div>
</div>


<div mat-dialog-actions>
<button mat-raised-button (click)="cancelDrawing()" >
{{'igo.geo.draw.cancel' | translate}}
</button>
<button
mat-raised-button
color="primary"
(click)="confirm()">
{{noLabelButton()}}
</button>
</div>
</div>

<div *ngIf="labelFlag === labelType.Custom">
<div>
<p class="mat-typography">{{ 'igo.geo.draw.dialogInstruction' | translate }}</p>
<mat-form-field class="input">
<input
#input
matInput
(select)="true"
(input)="getLabelLength($event.target.value)"
placeholder="{{'igo.geo.draw.dialogTitle' | translate}}"
value="{{ currentLabel }}"
cdkFocusInitial/>
</mat-form-field>
</div>

<div mat-dialog-actions>
<button mat-raised-button (click)="cancelDrawing()" >
{{'igo.geo.draw.cancel' | translate}}
</button>
<button
mat-raised-button
color="primary"
(click)="confirm(input.value)">
{{noLabelButton()}}
</button>
</div>
</div>
47 changes: 47 additions & 0 deletions packages/geo/src/lib/draw/draw/draw-popup.component.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
.mat-radio-button ~ .mat-radio-button {
margin-left: 16px;
}

.readOnly-Input {
width: 200px !important;
}

.unit-field {
width: 50px;
margin-left: 10px;
margin-top: 10px;
}

.mat-form-field {
position: sticky !important;
}
.coordinatesInputView {
top: 5em !important;
}

::ng-deep .mat-form-field-wrapper {
margin-bottom: -1.25em;
margin-top: 0.25em;
}

.geometry-type-toggle {
display: flex !important;
justify-content: center;
}

.mat-dialog-actions {
display: flex !important;
justify-content: center;
}

.input {
width: auto !important;
}

.mat-button-toggle-group, .mat-button-toggle {
width: 100%;
}

mat-checkbox {
margin-right: 10px;
}
Loading