Skip to content

Commit

Permalink
npm bump
Browse files Browse the repository at this point in the history
  • Loading branch information
xeolabs committed Dec 14, 2023
1 parent 3474c7c commit 6cc1d3b
Show file tree
Hide file tree
Showing 6 changed files with 291 additions and 19 deletions.
136 changes: 136 additions & 0 deletions dist/xeokit-bim-viewer.es.js
Original file line number Diff line number Diff line change
Expand Up @@ -10006,6 +10006,24 @@ class Wire {
});
}

if (cfg.onMouseDown) {
wireClickable.addEventListener('mousedown', (event) => {
cfg.onMouseDown(event, this);
});
}

if (cfg.onMouseUp) {
wireClickable.addEventListener('mouseup', (event) => {
cfg.onMouseUp(event, this);
});
}

if (cfg.onMouseMove) {
wireClickable.addEventListener('mousemove', (event) => {
cfg.onMouseMove(event, this);
});
}

if (cfg.onContextMenu) {
wireClickable.addEventListener('contextmenu', (event) => {
cfg.onContextMenu(event, this);
Expand Down Expand Up @@ -10164,9 +10182,14 @@ class Dot {
if (cfg.onContextMenu) ;
parentElement.appendChild(dotClickable);

dotClickable.addEventListener('click', (event) => {
parentElement.dispatchEvent(new MouseEvent('mouseover', event));
});

if (cfg.onMouseOver) {
dotClickable.addEventListener('mouseover', (event) => {
cfg.onMouseOver(event, this);
parentElement.dispatchEvent(new MouseEvent('mouseover', event));
});
}

Expand All @@ -10182,6 +10205,24 @@ class Dot {
});
}

if (cfg.onMouseDown) {
dotClickable.addEventListener('mousedown', (event) => {
cfg.onMouseDown(event, this);
});
}

if (cfg.onMouseUp) {
dotClickable.addEventListener('mouseup', (event) => {
cfg.onMouseUp(event, this);
});
}

if (cfg.onMouseMove) {
dotClickable.addEventListener('mousemove', (event) => {
cfg.onMouseMove(event, this);
});
}

if (cfg.onContextMenu) {
dotClickable.addEventListener('contextmenu', (event) => {
cfg.onContextMenu(event, this);
Expand Down Expand Up @@ -10324,6 +10365,24 @@ class Label {
});
}

if (cfg.onMouseDown) {
label.addEventListener('mousedown', (event) => {
cfg.onMouseDown(event, this);
});
}

if (cfg.onMouseUp) {
label.addEventListener('mouseup', (event) => {
cfg.onMouseUp(event, this);
});
}

if (cfg.onMouseMove) {
label.addEventListener('mousemove', (event) => {
cfg.onMouseMove(event, this);
});
}

if (cfg.onContextMenu) {
label.addEventListener('contextmenu', (event) => {
cfg.onContextMenu(event, this);
Expand Down Expand Up @@ -10460,10 +10519,12 @@ class AngleMeasurement extends Component {

const onMouseOver = cfg.onMouseOver ? (event) => {
cfg.onMouseOver(event, this);
this.plugin.viewer.scene.canvas.canvas.dispatchEvent(new MouseEvent('mouseover', event));
} : null;

const onMouseLeave = cfg.onMouseLeave ? (event) => {
cfg.onMouseLeave(event, this);
this.plugin.viewer.scene.canvas.canvas.dispatchEvent(new MouseEvent('mouseleave', event));
} : null;

const onContextMenu = cfg.onContextMenu ? (event) => {
Expand All @@ -10474,12 +10535,27 @@ class AngleMeasurement extends Component {
this.plugin.viewer.scene.canvas.canvas.dispatchEvent(new WheelEvent('wheel', event));
};

const onMouseDown = (event) => {
this.plugin.viewer.scene.canvas.canvas.dispatchEvent(new MouseEvent('mousedown', event));
} ;

const onMouseUp = (event) => {
this.plugin.viewer.scene.canvas.canvas.dispatchEvent(new MouseEvent('mouseup', event));
};

const onMouseMove = (event) => {
this.plugin.viewer.scene.canvas.canvas.dispatchEvent(new MouseEvent('mousemove', event));
};

this._originDot = new Dot(this._container, {
fillColor: this._color,
zIndex: plugin.zIndex !== undefined ? plugin.zIndex + 2 : undefined,
onMouseOver,
onMouseLeave,
onMouseWheel,
onMouseDown,
onMouseUp,
onMouseMove,
onContextMenu
});
this._cornerDot = new Dot(this._container, {
Expand All @@ -10488,6 +10564,9 @@ class AngleMeasurement extends Component {
onMouseOver,
onMouseLeave,
onMouseWheel,
onMouseDown,
onMouseUp,
onMouseMove,
onContextMenu
});
this._targetDot = new Dot(this._container, {
Expand All @@ -10496,6 +10575,9 @@ class AngleMeasurement extends Component {
onMouseOver,
onMouseLeave,
onMouseWheel,
onMouseDown,
onMouseUp,
onMouseMove,
onContextMenu
});

Expand All @@ -10506,6 +10588,9 @@ class AngleMeasurement extends Component {
onMouseOver,
onMouseLeave,
onMouseWheel,
onMouseDown,
onMouseUp,
onMouseMove,
onContextMenu
});
this._targetWire = new Wire(this._container, {
Expand All @@ -10515,6 +10600,9 @@ class AngleMeasurement extends Component {
onMouseOver,
onMouseLeave,
onMouseWheel,
onMouseDown,
onMouseUp,
onMouseMove,
onContextMenu
});

Expand All @@ -10526,6 +10614,9 @@ class AngleMeasurement extends Component {
onMouseOver,
onMouseLeave,
onMouseWheel,
onMouseDown,
onMouseUp,
onMouseMove,
onContextMenu
});

Expand Down Expand Up @@ -11965,6 +12056,7 @@ class AngleMeasurementsPlugin extends Plugin {
measurement.on("destroyed", () => {
delete this._measurements[measurement.id];
});
measurement.clickable = true;
this.fire("measurementCreated", measurement);
return measurement;
}
Expand Down Expand Up @@ -73396,12 +73488,26 @@ class DistanceMeasurement extends Component {

const onMouseOver = cfg.onMouseOver ? (event) => {
cfg.onMouseOver(event, this);
this.plugin.viewer.scene.canvas.canvas.dispatchEvent(new MouseEvent('mouseover', event));
} : null;

const onMouseLeave = cfg.onMouseLeave ? (event) => {
cfg.onMouseLeave(event, this);
this.plugin.viewer.scene.canvas.canvas.dispatchEvent(new MouseEvent('mouseleave', event));
} : null;

const onMouseDown = (event) => {
this.plugin.viewer.scene.canvas.canvas.dispatchEvent(new MouseEvent('mousedown', event));
} ;

const onMouseUp = (event) => {
this.plugin.viewer.scene.canvas.canvas.dispatchEvent(new MouseEvent('mouseup', event));
};

const onMouseMove = (event) => {
this.plugin.viewer.scene.canvas.canvas.dispatchEvent(new MouseEvent('mousemove', event));
};

const onContextMenu = cfg.onContextMenu ? (event) => {
cfg.onContextMenu(event, this);
} : null;
Expand All @@ -73416,6 +73522,9 @@ class DistanceMeasurement extends Component {
onMouseOver,
onMouseLeave,
onMouseWheel,
onMouseDown,
onMouseUp,
onMouseMove,
onContextMenu
});

Expand All @@ -73425,6 +73534,9 @@ class DistanceMeasurement extends Component {
onMouseOver,
onMouseLeave,
onMouseWheel,
onMouseDown,
onMouseUp,
onMouseMove,
onContextMenu
});

Expand All @@ -73436,6 +73548,9 @@ class DistanceMeasurement extends Component {
onMouseOver,
onMouseLeave,
onMouseWheel,
onMouseDown,
onMouseUp,
onMouseMove,
onContextMenu
});

Expand All @@ -73447,6 +73562,9 @@ class DistanceMeasurement extends Component {
onMouseOver,
onMouseLeave,
onMouseWheel,
onMouseDown,
onMouseUp,
onMouseMove,
onContextMenu
});

Expand All @@ -73458,6 +73576,9 @@ class DistanceMeasurement extends Component {
onMouseOver,
onMouseLeave,
onMouseWheel,
onMouseDown,
onMouseUp,
onMouseMove,
onContextMenu
});

Expand All @@ -73469,6 +73590,9 @@ class DistanceMeasurement extends Component {
onMouseOver,
onMouseLeave,
onMouseWheel,
onMouseDown,
onMouseUp,
onMouseMove,
onContextMenu
});

Expand All @@ -73480,6 +73604,9 @@ class DistanceMeasurement extends Component {
onMouseOver,
onMouseLeave,
onMouseWheel,
onMouseDown,
onMouseUp,
onMouseMove,
onContextMenu
});

Expand All @@ -73491,6 +73618,9 @@ class DistanceMeasurement extends Component {
onMouseOver,
onMouseLeave,
onMouseWheel,
onMouseDown,
onMouseUp,
onMouseMove,
onContextMenu
});

Expand All @@ -73502,6 +73632,9 @@ class DistanceMeasurement extends Component {
onMouseOver,
onMouseLeave,
onMouseWheel,
onMouseDown,
onMouseUp,
onMouseMove,
onContextMenu
});

Expand All @@ -73513,6 +73646,9 @@ class DistanceMeasurement extends Component {
onMouseOver,
onMouseLeave,
onMouseWheel,
onMouseDown,
onMouseUp,
onMouseMove,
onContextMenu
});

Expand Down
8 changes: 4 additions & 4 deletions dist/xeokit-bim-viewer.min.es.js

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions dist/xeokit-bim-viewer.min.umd.js

Large diffs are not rendered by default.

Loading

0 comments on commit 6cc1d3b

Please sign in to comment.