Skip to content

Commit

Permalink
Included mouse event with wellbore click to simplify external logic
Browse files Browse the repository at this point in the history
  • Loading branch information
tomktjemsland committed Feb 11, 2025
1 parent 23f4788 commit 3dd7637
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@equinor/videx-map",
"version": "1.14.8",
"version": "1.14.9",
"description": "Component for Pixi-overlay in Leaflet.",
"main": "dist/index.js",
"module": "dist/index.esm.js",
Expand Down
3 changes: 2 additions & 1 deletion src/WellboreModule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -246,12 +246,13 @@ export default class WellboreModule extends ModuleInterface {
return this.clearHighlight(this.config.onHighlightOff);
}

private handleMouseClick() : boolean {
private handleMouseClick(mouseEvent?: MouseEvent) : boolean {
if (this.config.onWellboreClick && this.highlight.active && this.highlight.single) {
const wellbore = this.highlight.first;
this.config.onWellboreClick({
group: wellbore.group.key,
data: wellbore.data,
mouseEvent,
});
return true;
}
Expand Down
2 changes: 1 addition & 1 deletion src/utils/wellbores/data/WellboreEventData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { WellboreData } from './WellboreData';
export class WellboreEventData {
public group: string;
public data: SourceData;

public mouseEvent?: MouseEvent;

constructor(group: string, data: SourceData) {
this.group = group;
Expand Down

0 comments on commit 3dd7637

Please sign in to comment.