Skip to content

Commit

Permalink
PB 1358: Allow printing measures again
Browse files Browse the repository at this point in the history
Issue : Measures could not be printed anymore
Cause : With the implementation, we had set the graphicYoffset to NaN instead of 0 when there is no offset, meaning the print service could not interpret it
Fix : We ensure the graphicYoffset is set to 0 if non existent.
  • Loading branch information
ltkum committed Jan 21, 2025
1 parent d9b3be2 commit f9bc53b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/api/print.api.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ class GeoAdminCustomizer extends BaseCustomizer {
this.printResolution
)
: 0
// don't ask why it works, but that's the best I could do.
symbolizer.graphicYOffset = Math.round(1000 * symbolizer.graphicYOffset ?? 0) / 1000
// if there is no graphicYOffset, we can't print points
symbolizer.graphicYOffset = Math.round(1000 * (symbolizer.graphicYOffset ?? 0)) / 1000
}
if (size) {
symbolizer.graphicWidth = adjustWidth(size[0] * scale, this.printResolution)
Expand Down

0 comments on commit f9bc53b

Please sign in to comment.