ghettovoice / vuelayers

Web map Vue components with the power of OpenLayers
https://vuelayers.github.io/
MIT License
681 stars 230 forks source link

VlOverlay: positioning is set to 'true' #421

Closed silvester-pari closed 3 years ago

silvester-pari commented 3 years ago

When dynamically changing the positioning of vl-overlay, it is set to true. So when displaying the scope, initially it shows correct (for example "bottom-left"), but on change it displays "true" (and therefore resets positioning to default): image

It might be because of the same name for parameter and boolean check in https://github.com/ghettovoice/vuelayers/blob/master/src/components/overlay/overlay.vue#L302 ? I think here, on change this.currentPositioning is always set to true?

      setPositioning (positioning) {
        positioning = !!positioning
        if (positioning !== this.currentPositioning) {
          this.currentPositioning = positioning
        }
        if (this.$overlay && positioning !== this.$overlay.getPositioning()) {
          this.$overlay.setPositioning(positioning)
        }
      },