Skip to content

Commit

Permalink
fix: spaces for measures and fixed digits
Browse files Browse the repository at this point in the history
  • Loading branch information
AlitaBernachot committed Nov 25, 2024
1 parent 2bed1de commit 0eb468d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions cypress/e2e/draw/draw-feat-circle.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ describe('Draw "Circle"', () => {
cy.get('*[data-cy="featItemLength"]').should('contain.text', '693.17 km')
// testing just integer part due to precision issues between local tests and CI
cy.get('*[data-cy="featItemArea"]')
.should('contain.text', 'Surface: 38235.')
.and('contain.text', ' km²')
.should('include.text', 'Surface:\u00A038235')
.and('include.text', ' km²')
})

it('updates length and area measurements when editing radius in panel', () => {
Expand Down
10 changes: 5 additions & 5 deletions src/components/draw/feature-measurements.vue
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,13 @@ function onClickValidateRadius(radius: number) {
<div class="lux-drawing-item-measurements">
<!-- Feature length, for LineString, Circle, Polygon -->
<div data-cy="featItemLength" v-if="featLength">
<span class="mr-1">{{ t('Length:') }}</span>
<span>{{ t('Length:') }}&nbsp;</span>
<span v-format-measure.length="featLength"></span>
</div>

<!-- Feature area, for Circle, Polygon -->
<div data-cy="featItemArea" v-if="featArea">
<span class="mr-1">{{ t('Area:') }}</span>
<span>{{ t('Area:') }}&nbsp;</span>
<span v-format-measure.area="featArea"></span>
</div>

Expand All @@ -115,7 +115,7 @@ function onClickValidateRadius(radius: number) {
v-if="featureType === 'drawnCircle'"
class="flex items-center"
>
<span class="mr-1">{{ t('Rayon:') }} </span>
<span>{{ t('Rayon:') }}&nbsp;</span>
<span
v-if="!isEditingFeature"
v-format-measure.length="featRadius"
Expand All @@ -140,10 +140,10 @@ function onClickValidateRadius(radius: number) {

<!-- Feature elevation, for Point -->
<div v-if="featureType === 'drawnPoint'">
<span>{{ t('Elevation') }}: </span>
<span>{{ t('Elevation') }}:&nbsp;</span>
<span
data-cy="featItemElevation"
v-format-measure.elevation="featElevation"
v-format-measure:2.elevation="featElevation"
></span>
</div>

Expand Down

0 comments on commit 0eb468d

Please sign in to comment.