iTwin / viewer-components-react

Components built on iTwin.js for usability in an iTwin.js based Viewer.
MIT License
24 stars 33 forks source link

[measure-tools] Tools do not get the latest 'snap' location #985

Open a-gagnon opened 2 months ago

a-gagnon commented 2 months ago

When we create a new measurement, the coordinates of the point are set inside the onMouseMotion function. If we move the mouse too fast, it creates a disconnect between the snap location and the measurement location. Most likely, this is because we get called onMouseMotion but the snap request hasn't returned yet. We would need to perform one final update when that request completes. There might be an event somewhere we can listen to in order to fix this.

image

Please refer to the video below. https://github.com/iTwin/viewer-components-react/assets/3418768/dfff6ff7-1636-447a-ae90-9b1de99346eb

GytisCepk commented 3 weeks ago

Bug should be fixed starting @itwin/core-frontend version 4.8.0.

Please close this issue if tool is behaving as expected.