@inweb/client 25.3.5 → 25.3.6

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.
@@ -37,12 +37,7 @@ export interface IPerspectiveCamera {
37
37
  up_vector: IDirection;
38
38
  field_of_view: number;
39
39
  }
40
- export declare enum LineType {
41
- Unknown = 0,
42
- Solid = "solid",
43
- Dot = "dot",
44
- Dash = "dash"
45
- }
40
+ export type LineType = "solid" | "dot" | "dash";
46
41
  export interface ILine {
47
42
  points: IPoint[];
48
43
  color: string;
package/lib/index.d.ts CHANGED
@@ -17,6 +17,7 @@ export { Role } from "./Api/Role";
17
17
  export { User } from "./Api/User";
18
18
  export { Viewer, Viewer as VisualizejsViewer } from "./Viewer/Viewer";
19
19
  export * from "./Api/ClientEvents";
20
+ export * from "./Viewer/Markup/IViewpoint";
20
21
  export * from "./Viewer/OptionsEvents";
21
22
  export * from "./Viewer/ViewerCommands";
22
23
  export * from "./Viewer/ViewerEvents";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inweb/client",
3
- "version": "25.3.5",
3
+ "version": "25.3.6",
4
4
  "description": "Client.js is a library for implementing BIM Project management applications.",
5
5
  "homepage": "https://cloud.opendesign.com/docs/index.html",
6
6
  "license": "SEE LICENSE IN LICENSE",
@@ -3,10 +3,10 @@ import { IMarkupLine } from "../../IMarkupLine";
3
3
  import { IMarkupColorable } from "../../IMarkupColorable";
4
4
  import { LineType } from "../../../IViewpoint";
5
5
 
6
- const LineTypeSpecs = new Map<LineType, number[]>([
7
- [LineType.Solid, []],
8
- [LineType.Dot, [30, 30, 0.001, 30]],
9
- [LineType.Dash, [30, 30]],
6
+ const LineTypeSpecs = new Map<string, number[]>([
7
+ ["solid", []],
8
+ ["dot", [30, 30, 0.001, 30]],
9
+ ["dash", [30, 30]],
10
10
  ]);
11
11
 
12
12
  export class KonvaLine implements IMarkupLine, IMarkupColorable {
@@ -100,24 +100,24 @@ export class KonvaLine implements IMarkupLine, IMarkupColorable {
100
100
 
101
101
  getLineType(): string {
102
102
  const typeSpecs = this._ref.dash() || [];
103
- let type = "solid";
103
+ let type: LineType;
104
104
  switch (typeSpecs) {
105
- case LineTypeSpecs.get(LineType.Dot):
105
+ case LineTypeSpecs.get("dot"):
106
106
  type = "dot";
107
107
  break;
108
- case LineTypeSpecs.get(LineType.Dash):
108
+ case LineTypeSpecs.get("dash"):
109
109
  type = "dash";
110
110
  break;
111
+ default:
112
+ type = "solid";
113
+ break;
111
114
  }
112
115
  return type;
113
116
  }
114
117
 
115
118
  setLineType(type: string) {
116
- const lineType = LineType[type];
117
- if (lineType) {
118
- const specs = LineTypeSpecs.get(lineType);
119
- if (specs) this._ref.dash(specs);
120
- }
119
+ const specs = LineTypeSpecs.get(type);
120
+ if (specs) this._ref.dash(specs);
121
121
  }
122
122
 
123
123
  addPoints(points: [{ x: number; y: number }]) {
@@ -44,12 +44,7 @@ export interface IPerspectiveCamera {
44
44
  field_of_view: number;
45
45
  }
46
46
 
47
- export enum LineType {
48
- Unknown,
49
- Solid = "solid",
50
- Dot = "dot",
51
- Dash = "dash",
52
- }
47
+ export type LineType = "solid" | "dot" | "dash";
53
48
 
54
49
  export interface ILine {
55
50
  points: IPoint[];
@@ -932,7 +932,7 @@ export class KonvaMarkup implements IMarkup {
932
932
  const konvaLine = new KonvaLine({
933
933
  points,
934
934
  color: color || this._markupColor.HexColor,
935
- type: type || LineType.Solid,
935
+ type: type || "solid",
936
936
  width: width || this.lineWidth,
937
937
  id,
938
938
  });
package/src/index.ts CHANGED
@@ -41,6 +41,7 @@ export { User } from "./Api/User";
41
41
  export { Viewer, Viewer as VisualizejsViewer } from "./Viewer/Viewer";
42
42
 
43
43
  export * from "./Api/ClientEvents";
44
+ export * from "./Viewer/Markup/IViewpoint";
44
45
  export * from "./Viewer/OptionsEvents";
45
46
  export * from "./Viewer/ViewerCommands";
46
47
  export * from "./Viewer/ViewerEvents";