@inweb/viewer-visualize 25.7.0 → 25.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/LICENSE +2 -2
  2. package/dist/viewer-visualize.js +330 -295
  3. package/dist/viewer-visualize.js.map +1 -1
  4. package/dist/viewer-visualize.min.js +1 -1
  5. package/dist/viewer-visualize.module.js +164 -149
  6. package/dist/viewer-visualize.module.js.map +1 -1
  7. package/lib/Viewer/Markup/Api/IMarkupLine.d.ts +4 -0
  8. package/lib/Viewer/Markup/Api/Impl/Konva/KonvaLine.d.ts +2 -3
  9. package/lib/Viewer/Markup/IMarkup.d.ts +28 -32
  10. package/lib/Viewer/Markup/IWorldTransform.d.ts +39 -0
  11. package/lib/Viewer/Markup/Impl/Konva/KonvaMarkup.d.ts +11 -6
  12. package/lib/Viewer/Markup/Impl/Konva/MarkupColor.d.ts +3 -0
  13. package/lib/Viewer/Markup/Impl/Visualize/VisualizeMarkup.d.ts +4 -4
  14. package/lib/Viewer/Markup/MarkupFactory.d.ts +10 -10
  15. package/lib/Viewer/Viewer.d.ts +60 -42
  16. package/lib/index.d.ts +12 -0
  17. package/package.json +5 -5
  18. package/src/Viewer/Commands/ApplyModelTransform.ts +2 -2
  19. package/src/Viewer/Commands/ClearMarkup.ts +2 -2
  20. package/src/Viewer/Commands/ClearSlices.ts +2 -2
  21. package/src/Viewer/Commands/CreatePreview.ts +2 -2
  22. package/src/Viewer/Commands/Explode.ts +2 -2
  23. package/src/Viewer/Commands/GetDefaultViewPositions.ts +2 -2
  24. package/src/Viewer/Commands/GetModels.ts +2 -2
  25. package/src/Viewer/Commands/GetSelected.ts +2 -2
  26. package/src/Viewer/Commands/HideSelected.ts +2 -2
  27. package/src/Viewer/Commands/IsolateSelected.ts +2 -2
  28. package/src/Viewer/Commands/RegenerateAll.ts +2 -2
  29. package/src/Viewer/Commands/ResetView.ts +2 -2
  30. package/src/Viewer/Commands/SelectModel.ts +2 -2
  31. package/src/Viewer/Commands/SetActiveDragger.ts +2 -2
  32. package/src/Viewer/Commands/SetDefaultViewPosition.ts +2 -2
  33. package/src/Viewer/Commands/SetMarkupColor.ts +2 -2
  34. package/src/Viewer/Commands/SetSelected.ts +2 -2
  35. package/src/Viewer/Commands/ShowAll.ts +2 -2
  36. package/src/Viewer/Commands/Unselect.ts +2 -2
  37. package/src/Viewer/Commands/ZoomToExtents.ts +2 -2
  38. package/src/Viewer/Commands/ZoomToObjects.ts +2 -2
  39. package/src/Viewer/Commands/ZoomToSelected.ts +2 -2
  40. package/src/Viewer/Commands/index.ts +2 -2
  41. package/src/Viewer/Draggers/Actions/OrbitAction.ts +2 -2
  42. package/src/Viewer/Draggers/Actions/PanAction.ts +2 -2
  43. package/src/Viewer/Draggers/Actions/ZoomAction.ts +2 -2
  44. package/src/Viewer/Draggers/Common/Geometry.ts +2 -2
  45. package/src/Viewer/Draggers/Common/GestureManager.ts +2 -2
  46. package/src/Viewer/Draggers/Common/OdBaseDragger.ts +2 -2
  47. package/src/Viewer/Draggers/Common/OdaGeAction.ts +2 -2
  48. package/src/Viewer/Draggers/MeasureLineDragger/MeasureLineItem.ts +2 -2
  49. package/src/Viewer/Draggers/MeasureLineDragger/MeasureUtils.ts +2 -2
  50. package/src/Viewer/Draggers/MeasureLineDragger/index.ts +2 -2
  51. package/src/Viewer/Draggers/OdBaseCuttingPlaneDragger.ts +2 -2
  52. package/src/Viewer/Draggers/OdCuttingPlaneXAxisDragger.ts +2 -2
  53. package/src/Viewer/Draggers/OdCuttingPlaneYAxisDragger.ts +2 -2
  54. package/src/Viewer/Draggers/OdCuttingPlaneZAxisDragger.ts +2 -2
  55. package/src/Viewer/Draggers/OdOrbitDragger.ts +2 -2
  56. package/src/Viewer/Draggers/OdPanDragger.ts +2 -2
  57. package/src/Viewer/Draggers/OdZoomDragger.ts +2 -2
  58. package/src/Viewer/Draggers/OdZoomWheelDragger.ts +2 -2
  59. package/src/Viewer/Draggers/OdZoomWindowDragger/OdSelectionFrame.ts +2 -2
  60. package/src/Viewer/Draggers/OdZoomWindowDragger/index.ts +2 -2
  61. package/src/Viewer/Draggers/OdaLineDragger.ts +2 -2
  62. package/src/Viewer/Draggers/OdaTextDragger.ts +2 -2
  63. package/src/Viewer/Draggers/OdaWalkDragger.ts +2 -2
  64. package/src/Viewer/Draggers/OrbitAroundBuildingDragger.ts +2 -2
  65. package/src/Viewer/Loaders/BaseLoader.ts +2 -2
  66. package/src/Viewer/Loaders/LoaderFactory.ts +2 -2
  67. package/src/Viewer/Loaders/TCSLoader.ts +2 -2
  68. package/src/Viewer/Loaders/VsfXLoader.ts +2 -2
  69. package/src/Viewer/Loaders/VsfXPartialLoader.ts +2 -2
  70. package/src/Viewer/Loaders/VsfXStreamingLoader.ts +2 -2
  71. package/src/Viewer/Markup/Api/IMarkupLine.ts +5 -0
  72. package/src/Viewer/Markup/Api/Impl/Konva/KonvaArrow.ts +1 -1
  73. package/src/Viewer/Markup/Api/Impl/Konva/KonvaCloud.ts +1 -1
  74. package/src/Viewer/Markup/Api/Impl/Konva/KonvaEllipse.ts +1 -1
  75. package/src/Viewer/Markup/Api/Impl/Konva/KonvaLine.ts +4 -5
  76. package/src/Viewer/Markup/Api/Impl/Konva/KonvaRectangle.ts +1 -1
  77. package/src/Viewer/Markup/Api/Impl/Konva/KonvaText.ts +1 -1
  78. package/src/Viewer/Markup/IMarkup.ts +34 -35
  79. package/src/Viewer/Markup/IWorldTransform.ts +46 -0
  80. package/src/Viewer/Markup/Impl/Konva/KonvaMarkup.ts +85 -161
  81. package/src/Viewer/Markup/Impl/Konva/MarkupColor.ts +3 -0
  82. package/src/Viewer/Markup/Impl/Visualize/VisualizeMarkup.ts +45 -10
  83. package/src/Viewer/Markup/MarkupFactory.ts +16 -20
  84. package/src/Viewer/Viewer.ts +103 -95
  85. package/src/Viewer/utils.ts +2 -2
  86. package/src/index.ts +14 -2
@@ -1,5 +1,5 @@
1
1
  ///////////////////////////////////////////////////////////////////////////////
2
- // Copyright (C) 2002-2021, Open Design Alliance (the "Alliance").
2
+ // Copyright (C) 2002-2024, Open Design Alliance (the "Alliance").
3
3
  // All rights reserved.
4
4
  //
5
5
  // This software and its documentation and related materials are owned by
@@ -14,7 +14,7 @@
14
14
  //
15
15
  // This application incorporates Open Design Alliance software pursuant to a
16
16
  // license agreement with Open Design Alliance.
17
- // Open Design Alliance Copyright (C) 2002-2021 by Open Design Alliance.
17
+ // Open Design Alliance Copyright (C) 2002-2024 by Open Design Alliance.
18
18
  // All rights reserved.
19
19
  //
20
20
  // By use of this software, its documentation or related materials, you
@@ -1,5 +1,5 @@
1
1
  ///////////////////////////////////////////////////////////////////////////////
2
- // Copyright (C) 2002-2021, Open Design Alliance (the "Alliance").
2
+ // Copyright (C) 2002-2024, Open Design Alliance (the "Alliance").
3
3
  // All rights reserved.
4
4
  //
5
5
  // This software and its documentation and related materials are owned by
@@ -14,7 +14,7 @@
14
14
  //
15
15
  // This application incorporates Open Design Alliance software pursuant to a
16
16
  // license agreement with Open Design Alliance.
17
- // Open Design Alliance Copyright (C) 2002-2021 by Open Design Alliance.
17
+ // Open Design Alliance Copyright (C) 2002-2024 by Open Design Alliance.
18
18
  // All rights reserved.
19
19
  //
20
20
  // By use of this software, its documentation or related materials, you
@@ -1,5 +1,5 @@
1
1
  ///////////////////////////////////////////////////////////////////////////////
2
- // Copyright (C) 2002-2021, Open Design Alliance (the "Alliance").
2
+ // Copyright (C) 2002-2024, Open Design Alliance (the "Alliance").
3
3
  // All rights reserved.
4
4
  //
5
5
  // This software and its documentation and related materials are owned by
@@ -14,7 +14,7 @@
14
14
  //
15
15
  // This application incorporates Open Design Alliance software pursuant to a
16
16
  // license agreement with Open Design Alliance.
17
- // Open Design Alliance Copyright (C) 2002-2021 by Open Design Alliance.
17
+ // Open Design Alliance Copyright (C) 2002-2024 by Open Design Alliance.
18
18
  // All rights reserved.
19
19
  //
20
20
  // By use of this software, its documentation or related materials, you
@@ -1,5 +1,5 @@
1
1
  ///////////////////////////////////////////////////////////////////////////////
2
- // Copyright (C) 2002-2021, Open Design Alliance (the "Alliance").
2
+ // Copyright (C) 2002-2024, Open Design Alliance (the "Alliance").
3
3
  // All rights reserved.
4
4
  //
5
5
  // This software and its documentation and related materials are owned by
@@ -14,7 +14,7 @@
14
14
  //
15
15
  // This application incorporates Open Design Alliance software pursuant to a
16
16
  // license agreement with Open Design Alliance.
17
- // Open Design Alliance Copyright (C) 2002-2021 by Open Design Alliance.
17
+ // Open Design Alliance Copyright (C) 2002-2024 by Open Design Alliance.
18
18
  // All rights reserved.
19
19
  //
20
20
  // By use of this software, its documentation or related materials, you
@@ -1,5 +1,5 @@
1
1
  ///////////////////////////////////////////////////////////////////////////////
2
- // Copyright (C) 2002-2021, Open Design Alliance (the "Alliance").
2
+ // Copyright (C) 2002-2024, Open Design Alliance (the "Alliance").
3
3
  // All rights reserved.
4
4
  //
5
5
  // This software and its documentation and related materials are owned by
@@ -14,7 +14,7 @@
14
14
  //
15
15
  // This application incorporates Open Design Alliance software pursuant to a
16
16
  // license agreement with Open Design Alliance.
17
- // Open Design Alliance Copyright (C) 2002-2021 by Open Design Alliance.
17
+ // Open Design Alliance Copyright (C) 2002-2024 by Open Design Alliance.
18
18
  // All rights reserved.
19
19
  //
20
20
  // By use of this software, its documentation or related materials, you
@@ -1,5 +1,5 @@
1
1
  ///////////////////////////////////////////////////////////////////////////////
2
- // Copyright (C) 2002-2021, Open Design Alliance (the "Alliance").
2
+ // Copyright (C) 2002-2024, Open Design Alliance (the "Alliance").
3
3
  // All rights reserved.
4
4
  //
5
5
  // This software and its documentation and related materials are owned by
@@ -14,7 +14,7 @@
14
14
  //
15
15
  // This application incorporates Open Design Alliance software pursuant to a
16
16
  // license agreement with Open Design Alliance.
17
- // Open Design Alliance Copyright (C) 2002-2021 by Open Design Alliance.
17
+ // Open Design Alliance Copyright (C) 2002-2024 by Open Design Alliance.
18
18
  // All rights reserved.
19
19
  //
20
20
  // By use of this software, its documentation or related materials, you
@@ -1,5 +1,5 @@
1
1
  ///////////////////////////////////////////////////////////////////////////////
2
- // Copyright (C) 2002-2021, Open Design Alliance (the "Alliance").
2
+ // Copyright (C) 2002-2024, Open Design Alliance (the "Alliance").
3
3
  // All rights reserved.
4
4
  //
5
5
  // This software and its documentation and related materials are owned by
@@ -14,7 +14,7 @@
14
14
  //
15
15
  // This application incorporates Open Design Alliance software pursuant to a
16
16
  // license agreement with Open Design Alliance.
17
- // Open Design Alliance Copyright (C) 2002-2021 by Open Design Alliance.
17
+ // Open Design Alliance Copyright (C) 2002-2024 by Open Design Alliance.
18
18
  // All rights reserved.
19
19
  //
20
20
  // By use of this software, its documentation or related materials, you
@@ -1,5 +1,5 @@
1
1
  ///////////////////////////////////////////////////////////////////////////////
2
- // Copyright (C) 2002-2021, Open Design Alliance (the "Alliance").
2
+ // Copyright (C) 2002-2024, Open Design Alliance (the "Alliance").
3
3
  // All rights reserved.
4
4
  //
5
5
  // This software and its documentation and related materials are owned by
@@ -14,7 +14,7 @@
14
14
  //
15
15
  // This application incorporates Open Design Alliance software pursuant to a
16
16
  // license agreement with Open Design Alliance.
17
- // Open Design Alliance Copyright (C) 2002-2021 by Open Design Alliance.
17
+ // Open Design Alliance Copyright (C) 2002-2024 by Open Design Alliance.
18
18
  // All rights reserved.
19
19
  //
20
20
  // By use of this software, its documentation or related materials, you
@@ -1,5 +1,5 @@
1
1
  ///////////////////////////////////////////////////////////////////////////////
2
- // Copyright (C) 2002-2021, Open Design Alliance (the "Alliance").
2
+ // Copyright (C) 2002-2024, Open Design Alliance (the "Alliance").
3
3
  // All rights reserved.
4
4
  //
5
5
  // This software and its documentation and related materials are owned by
@@ -14,7 +14,7 @@
14
14
  //
15
15
  // This application incorporates Open Design Alliance software pursuant to a
16
16
  // license agreement with Open Design Alliance.
17
- // Open Design Alliance Copyright (C) 2002-2021 by Open Design Alliance.
17
+ // Open Design Alliance Copyright (C) 2002-2024 by Open Design Alliance.
18
18
  // All rights reserved.
19
19
  //
20
20
  // By use of this software, its documentation or related materials, you
@@ -1,5 +1,5 @@
1
1
  ///////////////////////////////////////////////////////////////////////////////
2
- // Copyright (C) 2002-2021, Open Design Alliance (the "Alliance").
2
+ // Copyright (C) 2002-2024, Open Design Alliance (the "Alliance").
3
3
  // All rights reserved.
4
4
  //
5
5
  // This software and its documentation and related materials are owned by
@@ -14,7 +14,7 @@
14
14
  //
15
15
  // This application incorporates Open Design Alliance software pursuant to a
16
16
  // license agreement with Open Design Alliance.
17
- // Open Design Alliance Copyright (C) 2002-2021 by Open Design Alliance.
17
+ // Open Design Alliance Copyright (C) 2002-2024 by Open Design Alliance.
18
18
  // All rights reserved.
19
19
  //
20
20
  // By use of this software, its documentation or related materials, you
@@ -1,5 +1,5 @@
1
1
  ///////////////////////////////////////////////////////////////////////////////
2
- // Copyright (C) 2002-2021, Open Design Alliance (the "Alliance").
2
+ // Copyright (C) 2002-2024, Open Design Alliance (the "Alliance").
3
3
  // All rights reserved.
4
4
  //
5
5
  // This software and its documentation and related materials are owned by
@@ -14,7 +14,7 @@
14
14
  //
15
15
  // This application incorporates Open Design Alliance software pursuant to a
16
16
  // license agreement with Open Design Alliance.
17
- // Open Design Alliance Copyright (C) 2002-2021 by Open Design Alliance.
17
+ // Open Design Alliance Copyright (C) 2002-2024 by Open Design Alliance.
18
18
  // All rights reserved.
19
19
  //
20
20
  // By use of this software, its documentation or related materials, you
@@ -1,5 +1,5 @@
1
1
  ///////////////////////////////////////////////////////////////////////////////
2
- // Copyright (C) 2002-2021, Open Design Alliance (the "Alliance").
2
+ // Copyright (C) 2002-2024, Open Design Alliance (the "Alliance").
3
3
  // All rights reserved.
4
4
  //
5
5
  // This software and its documentation and related materials are owned by
@@ -14,7 +14,7 @@
14
14
  //
15
15
  // This application incorporates Open Design Alliance software pursuant to a
16
16
  // license agreement with Open Design Alliance.
17
- // Open Design Alliance Copyright (C) 2002-2021 by Open Design Alliance.
17
+ // Open Design Alliance Copyright (C) 2002-2024 by Open Design Alliance.
18
18
  // All rights reserved.
19
19
  //
20
20
  // By use of this software, its documentation or related materials, you
@@ -23,6 +23,11 @@
23
23
 
24
24
  import { IMarkupObject } from "./IMarkupObject";
25
25
 
26
+ /**
27
+ * Type of the markup line.
28
+ */
29
+ export type MarkupLineType = "solid" | "dot" | "dash";
30
+
26
31
  /**
27
32
  * Line Markup object
28
33
  */
@@ -82,7 +82,7 @@ export class KonvaArrow implements IMarkupArrow, IMarkupColorable {
82
82
  }
83
83
 
84
84
  getColor(): string {
85
- return this._ref.stroke();
85
+ return this._ref.stroke() as string;
86
86
  }
87
87
 
88
88
  setColor(hex: string) {
@@ -151,7 +151,7 @@ export class KonvaCloud implements IMarkupCloud, IMarkupColorable {
151
151
  }
152
152
 
153
153
  getColor(): string {
154
- return this._ref.stroke();
154
+ return this._ref.stroke() as string;
155
155
  }
156
156
 
157
157
  setColor(hex: string) {
@@ -120,7 +120,7 @@ export class KonvaEllipse implements IMarkupEllipse, IMarkupColorable {
120
120
  }
121
121
 
122
122
  getColor(): string {
123
- return this._ref.stroke();
123
+ return this._ref.stroke() as string;
124
124
  }
125
125
 
126
126
  setColor(hex: string) {
@@ -1,6 +1,5 @@
1
1
  import Konva from "konva";
2
- import { LineType } from "@inweb/viewer-core";
3
- import { IMarkupLine } from "../../IMarkupLine";
2
+ import { IMarkupLine, MarkupLineType } from "../../IMarkupLine";
4
3
  import { IMarkupColorable } from "../../IMarkupColorable";
5
4
 
6
5
  const LineTypeSpecs = new Map<string, number[]>([
@@ -13,7 +12,7 @@ export class KonvaLine implements IMarkupLine, IMarkupColorable {
13
12
  private _ref: Konva.Line;
14
13
 
15
14
  constructor(
16
- params: { points: { x: number; y: number }[]; type?: LineType; width?: number; color?: string; id?: string },
15
+ params: { points: { x: number; y: number }[]; type?: MarkupLineType; width?: number; color?: string; id?: string },
17
16
  ref = null
18
17
  ) {
19
18
  if (ref) {
@@ -64,7 +63,7 @@ export class KonvaLine implements IMarkupLine, IMarkupColorable {
64
63
  }
65
64
 
66
65
  getColor(): string {
67
- return this._ref.stroke();
66
+ return this._ref.stroke() as string;
68
67
  }
69
68
 
70
69
  setColor(hex: string) {
@@ -106,7 +105,7 @@ export class KonvaLine implements IMarkupLine, IMarkupColorable {
106
105
 
107
106
  getLineType(): string {
108
107
  const typeSpecs = this._ref.dash() || [];
109
- let type: LineType;
108
+ let type: MarkupLineType;
110
109
  switch (typeSpecs) {
111
110
  case LineTypeSpecs.get("dot"):
112
111
  type = "dot";
@@ -111,7 +111,7 @@ export class KonvaRectangle implements IMarkupRectangle, IMarkupColorable {
111
111
  }
112
112
 
113
113
  getColor(): string {
114
- return this._ref.stroke();
114
+ return this._ref.stroke() as string;
115
115
  }
116
116
 
117
117
  setColor(hex: string): void {
@@ -87,7 +87,7 @@ export class KonvaText implements IMarkupText, IMarkupColorable {
87
87
  }
88
88
 
89
89
  getColor(): string {
90
- return this._ref.fill();
90
+ return this._ref.fill() as string;
91
91
  }
92
92
 
93
93
  setColor(hex: string) {
@@ -21,24 +21,14 @@
21
21
  // acknowledge and accept the above terms.
22
22
  ///////////////////////////////////////////////////////////////////////////////
23
23
 
24
+ import { IEventEmitter } from "@inweb/eventemitter2";
24
25
  import { IViewpoint } from "@inweb/viewer-core";
25
-
26
- import { OdBaseDragger } from "../Draggers/Common/OdBaseDragger";
27
- import { Viewer } from "../Viewer";
26
+ import { IWorldTransform } from "./IWorldTransform";
28
27
  import { IMarkupObject } from "./Api/IMarkupObject";
29
28
 
30
29
  /**
31
- * Version of the markup support. Old = "Visualize", New = "Konva"
32
- */
33
- export enum MarkupType {
34
- Unknown,
35
- Konva = "Konva",
36
- Visualize = "Visualize",
37
- }
38
-
39
- /**
40
- * Defines type of markup object. For old Visualize markup ({@link MarkupType}) only "Line" and
41
- * "Text" markup objects are supported.
30
+ * Defines type of markup object. For `VisualizeJS` markup only the `Line` and `Text` markup
31
+ * objects are supported.
42
32
  */
43
33
  export enum MarkupMode {
44
34
  SelectMarkup = "SelectMarkup",
@@ -52,32 +42,42 @@ export enum MarkupMode {
52
42
  }
53
43
 
54
44
  /**
55
- * Specifies parameters and methods of the Markup object
45
+ * 2D markup core interface.
56
46
  */
57
47
  export interface IMarkup {
58
48
  /**
59
- * Width of the markup object line. Default is 4.
49
+ * Line width of the markup objects. Default is 4.
60
50
  */
61
51
  lineWidth: number;
62
52
 
63
53
  /**
64
- * Type of the Line markup object. Available types: "solid", "dot", "dash". Default is "solid".
54
+ * Type of the markup line. Available types: `solid`, `dot`, `dash`. Default is `solid`.
65
55
  */
66
56
  lineType: string;
67
57
 
68
58
  /**
69
- * Font size of the markup text. Default is 34.
59
+ * Font size of the markup text. Default is 34 px.
70
60
  */
71
61
  fontSize: number;
72
62
 
73
63
  /**
74
64
  * Start method to init Markup support for the Viewer instance.
75
65
  *
76
- * @param {Viewer} viewer - current {@link Viewer} object
77
- * @param canvas - {@link HTMLCanvasElement} of the Viewer
78
- * @param canvasEvents - list of used events of the Viewer
79
- */
80
- initialize(viewer: Viewer, canvas: HTMLCanvasElement, canvasEvents: string[]): void;
66
+ * @param canvas -
67
+ * {@link https://developer.mozilla.org/docs/Web/API/HTMLCanvasElement | HTMLCanvasElement}
68
+ * used to operate on.
69
+ * @param canvasEvents - List of `canvas` events that the markup should redirect to the `viewer`.
70
+ * @param viewer - `Viewer` instance viewer that receives `canvas` events.
71
+ * @param worldTransformer - Transformer of screen space into world space and vice versa. If
72
+ * a transformer is defined, viewpoint objects will be stored in world coordinates,
73
+ * otherwise in screen coordinates.
74
+ */
75
+ initialize(
76
+ canvas: HTMLCanvasElement,
77
+ canvasEvents: string[],
78
+ viewer?: IEventEmitter,
79
+ worldTransformer?: IWorldTransform
80
+ ): void;
81
81
 
82
82
  /**
83
83
  * Releases all resources allocated by this `Markup` instance. Call this method before
@@ -86,13 +86,12 @@ export interface IMarkup {
86
86
  dispose(): void;
87
87
 
88
88
  /**
89
- * Provide Javascript Map with all {@link OdBaseDragger} draggers used by Markup. We need this
90
- * map to register in {@link Viewer.registerDragger}
89
+ * Create markup overlay.
91
90
  */
92
- getDraggers(): Map<string, typeof OdBaseDragger>;
91
+ syncOverlay(): void;
93
92
 
94
93
  /**
95
- * Remove markup overlay.
94
+ * Clear markup overlay.
96
95
  */
97
96
  clearOverlay(): void;
98
97
 
@@ -138,37 +137,37 @@ export interface IMarkup {
138
137
  setViewpoint(viewpoint: IViewpoint): void;
139
138
 
140
139
  /**
141
- * Create a {@link IViewpoint} viewpoint
140
+ * Create a viewpoint.
142
141
  */
143
142
  getViewpoint(): IViewpoint;
144
143
 
145
144
  /**
146
- * Create a Markup object
145
+ * Create a Markup object.
147
146
  *
148
- * @param type - string identificator of Markup type
149
- * @param params - object with parameters of Markup
147
+ * @param type - string identificator of Markup object type.
148
+ * @param params - Markup object parameters.
150
149
  */
151
150
  createObject(type: string, params: any): IMarkupObject;
152
151
 
153
152
  /**
154
- * Get array of all existed Markup objects
153
+ * Get Markup objects.
155
154
  */
156
155
  getObjects(): IMarkupObject[];
157
156
 
158
157
  /**
159
- * Get array of currently selected Markup objects
158
+ * Get selected Markup objects.
160
159
  */
161
160
  getSelectedObjects(): IMarkupObject[];
162
161
 
163
162
  /**
164
- * Select list of Markup objects
163
+ * Select Markup objects.
165
164
  *
166
165
  * @param objects
167
166
  */
168
167
  selectObjects(objects: IMarkupObject[]): void;
169
168
 
170
169
  /**
171
- * Clear list of currently selected Markup objects
170
+ * Clear Markup objects selection.
172
171
  */
173
172
  clearSelected(): void;
174
173
  }
@@ -0,0 +1,46 @@
1
+ ///////////////////////////////////////////////////////////////////////////////
2
+ // Copyright (C) 2002-2024, Open Design Alliance (the "Alliance").
3
+ // All rights reserved.
4
+ //
5
+ // This software and its documentation and related materials are owned by
6
+ // the Alliance. The software may only be incorporated into application
7
+ // programs owned by members of the Alliance, subject to a signed
8
+ // Membership Agreement and Supplemental Software License Agreement with the
9
+ // Alliance. The structure and organization of this software are the valuable
10
+ // trade secrets of the Alliance and its suppliers. The software is also
11
+ // protected by copyright law and international treaty provisions. Application
12
+ // programs incorporating this software must include the following statement
13
+ // with their copyright notices:
14
+ //
15
+ // This application incorporates Open Design Alliance software pursuant to a
16
+ // license agreement with Open Design Alliance.
17
+ // Open Design Alliance Copyright (C) 2002-2024 by Open Design Alliance.
18
+ // All rights reserved.
19
+ //
20
+ // By use of this software, its documentation or related materials, you
21
+ // acknowledge and accept the above terms.
22
+ ///////////////////////////////////////////////////////////////////////////////
23
+
24
+ /**
25
+ * Viewer coordiate system transformer.
26
+ */
27
+ export interface IWorldTransform {
28
+ /**
29
+ * Transforms `position` from screen space into world space.
30
+ *
31
+ * @param position - screen position in pixels.
32
+ */
33
+ screenToWorld(position: { x: number; y: number }): { x: number; y: number; z: number };
34
+
35
+ /**
36
+ * Transforms `position` from world space into screen space.
37
+ *
38
+ * @param position - position in world space coordinates.
39
+ */
40
+ worldToScreen(position: { x: number; y: number; z: number }): { x: number; y: number };
41
+
42
+ /**
43
+ * Returns the scaling factors for each axis in world space.
44
+ */
45
+ getScale(): { x: number; y: number; z: number };
46
+ }