geostyler / geostyler

Generic Styler for geodata
http://geostyler.org
BSD 2-Clause "Simplified" License
264 stars 59 forks source link

Symbolizer too large (using browser-bundle in a non-react web application) #1238

Closed chrismayer closed 3 years ago

chrismayer commented 4 years ago

Bug

Not sure if this is a real bug in GeoStyler, but I try to explain for the case anyone has an idea what is going wrong and to give other devs a platform if they discover the same behaviour.

Describe the bug I am using GeoStyler as browser-bundle in a non-react web application. The GeoStyler UI (compact mode) is rendered within a div in the browser DOM. The first time the GeoStyler gets rendered (after application startup) the symbolizer preview in the rule table is rendered too large, so its boundaries are moved outside the visible area. In case of having a "Fill Symbolizer" with a transparent fill it looks like the symbolizer preview is not working at all. What really happens is that the outline of the symbolizer is shifted to the non-visible area (see section Screenshots).

To Reproduce I could not reproduce the behaviour in a public GeoStyler instance (e.g. geostyler-demo-app). Therefore I am not sure if the setup (using browser-bundle in non-react webapp) is the reason for this.

Expected behaviour The symbolizer is appears in the correct size the first time the GeoStyler is rendered to the DOM.

Screenshots

Buggy: grafik

Correct: grafik

Desktop (please complete the following information):

Additional context The style is loaded as SLD and transformed to GeoStyler style before it is applied.

...
  <PolygonSymbolizer>
    <Stroke>
      <CssParameter name="stroke">#0000ee</CssParameter>
      <CssParameter name="stroke-width">2</CssParameter>
    </Stroke>
  </PolygonSymbolizer>
...
KaiVolland commented 4 years ago

Hmm. We don't have this issue in our applications which use the browser-bundle.

KaiVolland commented 3 years ago

@chrismayer is this issue still valid? If yes please reopen it.