Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX: Add type definitions for measurementEnd and measurementCancel in DistanceMeasurementsPlugin.d.ts #1244

Conversation

tmarti
Copy link
Contributor

@tmarti tmarti commented Nov 17, 2023

Description

The following piece of code...

if (mouseHovering) {
this._currentDistanceMeasurement.clickable = true;
this.distanceMeasurementsPlugin.fire("measurementEnd", this._currentDistanceMeasurement);
this._currentDistanceMeasurement = null;
} else {
this._currentDistanceMeasurement.destroy();
this.distanceMeasurementsPlugin.fire("measurementCancel", this._currentDistanceMeasurement);
this._currentDistanceMeasurement = null;
}

... is firing "measurementEnd" and "measurementCancel" events on DistanceMeasurementsPlugin, but the .d.ts file is missing those event definitions.

This PR adds their definition so Typescript consumers can subscribe to them 🙂.

@ghost
Copy link

ghost commented Nov 17, 2023

👇 Click on the image for a new way to code review

Review these changes using an interactive CodeSee Map

Legend

CodeSee Map legend

@xeolabs xeolabs added this to the 2.4.2 milestone Nov 17, 2023
@xeolabs xeolabs merged commit 66a3be1 into xeokit:master Nov 17, 2023
2 checks passed
@xeolabs xeolabs changed the title Add type definitions for measurementEnd and measurementCancel in DistanceMeasurementsPlugin.d.ts FIX: Add type definitions for measurementEnd and measurementCancel in DistanceMeasurementsPlugin.d.ts Nov 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants