Skip to content

Commit

Permalink
Merge pull request #1002 from geoadmin/fix-PB-761-default-text-size-i…
Browse files Browse the repository at this point in the history
…f-text-size-equal-zero

PB-761: Don't override text scale if it is zero - #patch
  • Loading branch information
ltshb authored Jul 16, 2024
2 parents 510548f + ca7a9ea commit 7eb477c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/utils/ol/format/KML.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// NOTE: This file can be removed and we can use the ol/format/KML.js once the PR
// https://github.com/openlayers/openlayers/pull/15964 has been merged and released.
/* eslint-disable */
// @ts-nocheck

Expand Down Expand Up @@ -983,7 +985,7 @@ function createNameStyleFunction(foundStyle, name) {
// Note that kml does not support many text options that OpenLayers does (rotation, textBaseline).
textStyle = textStyle.clone()
textStyle.setFont(textStyle.getFont() || DEFAULT_TEXT_STYLE.getFont())
textStyle.setScale(textStyle.getScale() || DEFAULT_TEXT_STYLE.getScale())
textStyle.setScale(textStyle.getScale() ?? DEFAULT_TEXT_STYLE.getScale())
textStyle.setFill(textStyle.getFill() || DEFAULT_TEXT_STYLE.getFill())
textStyle.setStroke(textStyle.getStroke() || DEFAULT_TEXT_STROKE_STYLE)
} else {
Expand Down

0 comments on commit 7eb477c

Please sign in to comment.