feat(draw): added possibility to use a predefined radius when drawing circle in drawing tool#1090
Merged
Conversation
LAMM26
reviewed
Aug 3, 2022
| </div> | ||
|
|
||
| <div class="draw-options mat-typography"> | ||
| <mat-slide-toggle |
Contributor
There was a problem hiding this comment.
Remettre les inputs sur des lignes distinctes, comme version précédente
LAMM26
reviewed
Aug 3, 2022
| </div> | ||
|
|
||
| <div class="draw-options mat-typography"> | ||
| <mat-slide-toggle |
Contributor
There was a problem hiding this comment.
Remettre les inputs sur des lignes distinctes, comme version précédente
Contributor
Author
There was a problem hiding this comment.
j'ai modifie le fichier draw.component.html
LAMM26
reviewed
Aug 3, 2022
| (colorPickerChange)="onColorChange(labelsAreShown, false)"/> | ||
| </mat-form-field> | ||
| </div> | ||
| <mat-slide-toggle *ngIf="isCircle()" [checked]="usePredefinedRadius" [labelPosition]="'before'" |
LAMM26
reviewed
Aug 3, 2022
| (colorPickerChange)="onColorChange(labelsAreShown, false)"> | ||
| </mat-form-field> | ||
| </div> | ||
| <mat-slide-toggle *ngIf="isLineString() || isPolygon()" [checked]="freehandMode" [labelPosition]="'before'" |
| <div class="radius-unit" *ngIf="isCircle()"> | ||
| <form class="radius-form"> | ||
| <mat-form-field class="radius"> | ||
| <input matInput type="number" min="0" placeholder="{{ 'igo.geo.spatialFilter.radius' | translate }}" |
| {{ 'igo.geo.draw.fill' | translate }} | ||
| </span> | ||
|
|
||
| <mat-form-field class="fill-field" appearance="outline" floatLabel="always" tooltip-position="below" |
|
|
||
| @Input() store: FeatureStore<FeatureWithDraw>; // Drawing store | ||
|
|
||
|
|
| if (olGeometry.get('radius')) { | ||
| value.radius = olGeometry.get('radius'); | ||
| olGeometry.set('radius', value.radius); | ||
| console.log(value.radius); |
| const coordinates = olproj.transform(center, this.map.projection, 'EPSG:4326'); | ||
| const radius = Math.round(olGeometry.getRadius() * (Math.cos((Math.PI / 180) * coordinates[1]))); | ||
|
|
||
| console.log(radius); |
| "finish": "Finish current drawing", | ||
| "freehandMode": "Use a predefined radius", | ||
| "icon": "Icons", | ||
| "InsertvalueRadius": "Insert predefined radius", |
Contributor
There was a problem hiding this comment.
remove capitalization (insertValueRadius)
| "drawing": "Draws", | ||
| "fill": "Fill", | ||
| "finish": "Finish current drawing", | ||
| "freehandMode": "Use a predefined radius", |
pelord
approved these changes
Dec 15, 2022
cbourget
pushed a commit
that referenced
this pull request
Mar 21, 2023
… circle in drawing tool (#1090) * feat(draw): test rayon cercle * tests * tests draw rayon fixe * lint * change circle radius of interactionStyle * style-olinteractionstyle * resolve conflict * replaced build scripts in packages * lint and freehand mode for lines and polygons * console logs for tests * dubugging * condition if radDef with mistakes * ajout_de_radius_dans_map * rayon_predefinie_final * drawcomponenthtml_modifyed * fix merge errors * wip * fix(draw/spatial-filter): fix drawStyle interaction * refactor(draw): keep only one toggle for freehand * fix(draw/spatial-filter): fix interaction style on freehand Co-authored-by: MAXIME LAMER <maxime.lamer@msp.gouv.qc.ca> Co-authored-by: Philippe Lafreniere <philippe.lafreniere@msp.gouv.qc.ca>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Please check if the PR fulfills these requirements
What is the current behavior? (You can also link to an open issue here)
infra-geo-ouverte/igo2#666
What is the new behavior?
added possibility to use a predefined radius when drawing circle in drawing tool
Does this PR introduce a breaking change? (check one with "x")
If this PR contains a breaking change, please describe the impact and migration path for existing applications:
N/A
Other information: