diff --git a/src/api/print.api.js b/src/api/print.api.js index 1495bf22b..3905b687f 100644 --- a/src/api/print.api.js +++ b/src/api/print.api.js @@ -134,10 +134,9 @@ class GeoAdminCustomizer extends BaseCustomizer { ) : 0 // don't ask why it works, but that's the best I could do. - - symbolizer.graphicYOffset = symbolizer.graphicYOffset - ? (symbolizer.graphicYOffset = adjustWidth(-size[1], this.printResolution)) - : 0 + // Note(IS): I'm not sure if this is the best way to handle the Y offset. Need to be tested of different case. + // Per issue 1278, it's correct. But Martin did it differently, but all test is pass. + symbolizer.graphicYOffset = symbolizer.graphicYOffset ? symbolizer.graphicYOffset : 0 } if (size) { symbolizer.graphicWidth = adjustWidth(size[0] * scale, this.printResolution) diff --git a/src/utils/styleUtils.js b/src/utils/styleUtils.js index 3545c09aa..799e259a9 100644 --- a/src/utils/styleUtils.js +++ b/src/utils/styleUtils.js @@ -161,7 +161,7 @@ export const highlightPointStyle = new Style({ // Change a width according to the change of DPI (from the old geoadmin) // Originally introduced here https://github.com/geoadmin/mf-geoadmin3/pull/3280 export function adjustWidth(width, dpi) { - if (!width || isNaN(width) || width <= 0.0 || !dpi || isNaN(dpi) || dpi <= 0) { + if (!width || isNaN(width) || !dpi || isNaN(dpi) || dpi <= 0) { return 0 }