AnatomicMaps / flatmap-viewer

Apache License 2.0
0 stars 7 forks source link

Added new events to fix drawn annotation popup issue and modified click event to get correct callbacks #23

Closed ddjnw1yu closed 9 months ago

ddjnw1yu commented 9 months ago

A few more things have been added/modified:

  1. Added the event handler for the draw.modechange event and the modeChanged event. It tracks the state change while creating/clicking dawn annotations.

  2. Added the aborted event. It will help to indicate the popup window is closed.

  3. Modified the showPopup function to fix the drawn annotation popup. Pass new attribute annotationFeatureGeometry in options. annotationFeatureGeometry is the central geo coordinate for the drawn annotation.

  4. Added the clear feature function, which is used to switch the display of different types of drawn annotation.

Below is related to displaying relevant features while creating(maybe also updating/deleting) new annotations (A request from Andre).

  1. Modified 'this.clickEvent_' function to fix can only click on the annotation layer issue when starting drawing. This shows relevant features while drawing connectivities or points.
  2. Binded 'touchend' event to 'this.clickEvent_'. This fixed the no-callback event issue in the tablet browser(touch screen).
dbrnz commented 9 months ago

All looks good, thanks!