-
Notifications
You must be signed in to change notification settings - Fork 26
feat(draw): added possibility to use a predefined radius when drawing circle in drawing tool #1090
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test
@@ -21,184 +21,138 @@ | |||
</div> | |||
|
|||
<div class="draw-options mat-typography"> | |||
<mat-slide-toggle |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remettre les inputs sur des lignes distinctes, comme version précédente
@@ -21,184 +21,138 @@ | |||
</div> | |||
|
|||
<div class="draw-options mat-typography"> | |||
<mat-slide-toggle |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remettre les inputs sur des lignes distinctes, comme version précédente
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
j'ai modifie le fichier draw.component.html
(colorPickerChange)="onColorChange(labelsAreShown, false)"/> | ||
</mat-form-field> | ||
</div> | ||
<mat-slide-toggle *ngIf="isCircle()" [checked]="usePredefinedRadius" [labelPosition]="'before'" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Idem
(colorPickerChange)="onColorChange(labelsAreShown, false)"> | ||
</mat-form-field> | ||
</div> | ||
<mat-slide-toggle *ngIf="isLineString() || isPolygon()" [checked]="freehandMode" [labelPosition]="'before'" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Idem
<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 }}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Idem
{{ 'igo.geo.draw.fill' | translate }} | ||
</span> | ||
|
||
<mat-form-field class="fill-field" appearance="outline" floatLabel="always" tooltip-position="below" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Idem
@@ -90,6 +92,7 @@ export class DrawComponent implements OnInit, OnDestroy { | |||
|
|||
@Input() store: FeatureStore<FeatureWithDraw>; // Drawing store | |||
|
|||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove newline
@@ -459,6 +459,9 @@ export class GeometryFormFieldInputComponent implements OnInit, OnDestroy, Contr | |||
if (olGeometry.get('radius')) { | |||
value.radius = olGeometry.get('radius'); | |||
olGeometry.set('radius', value.radius); | |||
console.log(value.radius); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove logs
@@ -467,7 +470,8 @@ export class GeometryFormFieldInputComponent implements OnInit, OnDestroy, Contr | |||
const center = olGeometry.getCenter(); | |||
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); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove logs
packages/geo/src/locale/en.geo.json
Outdated
"icon": "Icons", | ||
"InsertvalueRadius": "Insert predefined radius", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove capitalization (insertValueRadius)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Use a predefined radius"
packages/geo/src/locale/en.geo.json
Outdated
@@ -681,7 +681,9 @@ | |||
"drawing": "Draws", | |||
"fill": "Fill", | |||
"finish": "Finish current drawing", | |||
"freehandMode": "Use a predefined radius", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this translation
… 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>
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: