DrawTool: aborting creation of a shape does not stop the onTemporaryPointMoved callback to be called
Summary
If the signal passed to DrawTool.createShape() is aborted, then event listeners registered during creation are not unregistered, and the onTemporaryPointMoved keeps being called whenever the mouse is moving.
Steps to reproduce
- Create a shape with the drawtool, and pass an
AbortSignalas well as the theonTemporaryPointMovedcallback:
const controller = new AbortController();
drawTool.createSegment({ signal: controller.signal, onTemporaryPointMoved: () => console.log('callback called!') });
- Abort the signal with
controller.abort() - Move the mouse around
Expected behaviour:
The callback is not called.
Actual behaviour:
The callback is called.
Informations
- Giro3D version: 0.39
- Browser (Firefox, Chrome, Opera, Safari...) and version: N/A
- OS (Linux, MacOS, Windows...) N/A
Screenshots
Edited by Sébastien Guimmara