Skip to content

No drawstart/drawend events are thrown after drawType Change #361

@fbatschi

Description

@fbatschi

Describe the bug

If an ol-interaction-draw interaction is used, only the drawType that is initially set throws events like drawstart and drawend.
Once you change the drawType, no more events are thrown.

Affected version(s)

appears in latest version v10, havent tested other version

To Reproduce
Steps to reproduce the behavior:

  1. Simply go to https://vue3openlayers.netlify.app/componentsguide/interactions/draw/ and use the first demo.
  2. Draw a polygon into the map
  3. once finished there is a event/feature output in the console.
  4. once you change the drawtype to another type like a point or circle, no more event output happens

Alternatively use the demo at https://vue3openlayers.netlify.app/componentsguide/mapcontrols/controlbar/
this should always drop events when drawing ends, but same result, only for the initially selected drawType.

Expected behavior
There should always be the events thrown for drawstart or drawend

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions