articodeltd / angular-cesium

JavaScript library for creating map based web apps using Cesium and Angular
https://github.com/articodeltd/angular-cesium/settings/pages
MIT License
178 stars 93 forks source link

Selection not working anymore after disposing polyline creation using PolylinesEditorService #427

Open ISchwarz23 opened 2 years ago

ISchwarz23 commented 2 years ago

Intended outcome: When using the PoylinesEditorService to let the user create polylines on the map, the user interaction should be the default behavior after the polyline creation is finished.

Actual outcome: The polyline creation is working as expected. The editing process is also finished as expected (clicks won't produce new anchor points), but when clicking on an entity, it is not selected anymore.

How to reproduce the issue: Start polyline creation, when editor "CHANGE_TO_EDIT" is called, process the result and dispose edit process. When creation is finised/disposed, entities cannot be selected anymore.

this.editing$ = this.editor.create();
this.editing$.subscribe((editResult) => {
    if (editResult.editAction === EditActions.CHANGE_TO_EDIT) {
        const result = this.editing$.getCurrentPoints();
        // process result here
        this.editing$.disable();
        this.editing$.dispose();
   }
});

Version