Skip to content

Commit

Permalink
PB-798: Leading/ending white spaces character is not supported in KML…
Browse files Browse the repository at this point in the history
… feature name

The feature name in KML doesn't support leading/ending white space. Openlayer
don't support it (also tried to used <![CDATA[]]> but don't work). On google
earth we cannot add multiline feature titles ! and when using leading space
it somehow cuts the end of the title so, not working neither.

The issue that we add is that leading white spaces were allowed and worked
while drawing, but were trimmed by openlayer when loading the drawing, so user
complained that their title did not stayed at the same place as the put them
while drawing.

To avoid this we trim the text when entering it, so the text always appears trimmed
in the view even in drawing. This way if the user add leading blank line the text
stays at the top of the icon.
  • Loading branch information
ltshb committed Jul 12, 2024
1 parent dc01417 commit 7689ed0
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/modules/infobox/components/styling/FeatureStyleEdit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ const debounceDescriptionUpdate = debounce(updateFeatureDescription, 300)
function updateFeatureTitle() {
store.dispatch('changeFeatureTitle', {
feature: feature.value,
title: title.value,
title: title.value.trim(),
...dispatcher,
})
}
Expand Down Expand Up @@ -186,6 +186,7 @@ function mediaTypes() {
:class="{
'form-control-plaintext': readOnly,
}"
rows="1"
></textarea>
</div>
Expand Down Expand Up @@ -302,9 +303,3 @@ function mediaTypes() {
</div>
</div>
</template>
<style lang="scss" scoped>
.feature-title {
height: 1rem;
}
</style>

0 comments on commit 7689ed0

Please sign in to comment.