Skip to content

Commit

Permalink
Merge pull request #1482 from xeokit/add-measurement-canvasToPagePos-…
Browse files Browse the repository at this point in the history
…typedef

[FIX] Add canvasToPagePos typedef for measurement plugins #1481
  • Loading branch information
xeolabs authored May 3, 2024
2 parents 5c9a410 + ba4033c commit 46b1cd1
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AngleMeasurementsControl } from "./AngleMeasurementsControl.js";
import {AngleMeasurementsControl} from "./AngleMeasurementsControl.js";
import {AngleMeasurementsPlugin} from "./AngleMeasurementsPlugin";
import {PointerLens} from "../../extras/";

Expand Down Expand Up @@ -42,11 +42,13 @@ export class AngleMeasurementsMouseControl extends AngleMeasurementsControl {
* @param {AngleMeasurementsPlugin} angleMeasurementsPlugin The AngleMeasurementsPlugin to control.
* @param {Object} [cfg] Configuration options.
* @param {PointerLens} [cfg.pointerLens] A PointerLens to use for providing a magnified view of the cursor when snapping is enabled.
* @param {function} [cfg.canvasToPagePos] Optional function to map canvas-space coordinates to page coordinates.
* @param {boolean} [cfg.snapping=true] Whether to initially enable snap-to-vertex and snap-to-edge for this AngleMeasurementsMouseControl.
*/
constructor(angleMeasurementsPlugin: AngleMeasurementsPlugin, cfg?: {
pointerLens?: PointerLens;
snapping?: boolean;
canvasToPagePos? : Function;
});

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,13 @@ export class AngleMeasurementsTouchControl extends AngleMeasurementsControl {
* @param {AngleMeasurementsPlugin} angleMeasurementsPlugin The AngleMeasurementsPlugin to control.
* @param {Object} [cfg] Configuration options.
* @param {PointerLens} [cfg.pointerLens] A PointerLens to use for providing a magnified view of the cursor when snapping is enabled.
* @param {function} [cfg.canvasToPagePos] Optional function to map canvas-space coordinates to page coordinates.
* @param {boolean} [cfg.snapping=true] Whether to initially enable snap-to-vertex and snap-to-edge for this AngleMeasurementsTouchControl.
*/
constructor(angleMeasurementsPlugin: AngleMeasurementsPlugin, cfg?: {
pointerLens?: PointerLens;
snapping?: boolean;
canvasToPagePos? : Function;
});

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@ export class DistanceMeasurementsMouseControl extends DistanceMeasurementsContro
* @param {DistanceMeasurementsPlugin} distanceMeasurementsPlugin The DistanceMeasurementsPlugin to control.
* @param {Object} cfg Configuration options.
* @param {PointerLens} [cfg.pointerLens] A PointerLens to provide a magnified view of the cursor when snapping is enabled.
* @param {function} [cfg.canvasToPagePos] Optional function to map canvas-space coordinates to page coordinates.
* @param {boolean} [cfg.snapping=true] Whether to enable snap-to-vertex and snap-to-edge for this DistanceMeasurementsMouseControl.
*/
constructor(distanceMeasurementsPlugin: DistanceMeasurementsPlugin, cfg?: {
pointerLens?: PointerLens;
snapping?: boolean;
canvasToPagePos? : Function;
});

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@ export class DistanceMeasurementsTouchControl extends DistanceMeasurementsContro
* @param {DistanceMeasurementsPlugin} distanceMeasurementsPlugin The DistanceMeasurementsPlugin to control.
* @param {Object} cfg Configuration options.
* @param {PointerLens} [cfg.pointerLens] A PointerLens to provide a magnified view of the cursor when snapping is enabled.
* @param {function} [cfg.canvasToPagePos] Optional function to map canvas-space coordinates to page coordinates.
* @param {boolean} [cfg.snapping=true] Whether to enable snap-to-vertex and snap-to-edge for this DistanceMeasurementsTouchControl.
*/
constructor(distanceMeasurementsPlugin: DistanceMeasurementsPlugin, cfg?: {
pointerLens?: PointerLens;
snapping?: boolean;
canvasToPagePos? : Function;
});

/**
Expand Down

0 comments on commit 46b1cd1

Please sign in to comment.