@inweb/client 25.3.8 → 25.3.10
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.
- package/dist/client.js +709 -687
- package/dist/client.js.map +1 -1
- package/dist/client.min.js +1 -1
- package/dist/client.module.js +621 -586
- package/dist/client.module.js.map +1 -1
- package/lib/Api/Client.d.ts +5 -8
- package/lib/Viewer/Markup/Api/Impl/Konva/KonvaCloud.d.ts +4 -4
- package/lib/Viewer/Markup/Api/Impl/Konva/KonvaEllipse.d.ts +1 -1
- package/lib/Viewer/Markup/Api/Impl/Konva/KonvaLine.d.ts +3 -3
- package/lib/Viewer/Markup/Api/Impl/Konva/KonvaRectangle.d.ts +4 -4
- package/lib/Viewer/Markup/Api/Impl/Konva/KonvaText.d.ts +3 -3
- package/lib/Viewer/Markup/IViewpoint.d.ts +30 -26
- package/lib/Viewer/Viewer.d.ts +0 -6
- package/package.json +1 -1
- package/src/Api/Client.ts +44 -12
- package/src/Viewer/Markup/Api/Impl/Konva/KonvaCloud.ts +4 -4
- package/src/Viewer/Markup/Api/Impl/Konva/KonvaEllipse.ts +1 -1
- package/src/Viewer/Markup/Api/Impl/Konva/KonvaLine.ts +1 -1
- package/src/Viewer/Markup/Api/Impl/Konva/KonvaRectangle.ts +6 -6
- package/src/Viewer/Markup/Api/Impl/Konva/KonvaText.ts +3 -3
- package/src/Viewer/Markup/IViewpoint.ts +31 -26
- package/src/Viewer/Markup/Impl/Konva/KonvaMarkup.ts +8 -8
- package/src/Viewer/Markup/Impl/Visualize/VisualizeMarkup.ts +6 -6
- package/src/Viewer/Viewer.ts +1 -14
package/src/Viewer/Viewer.ts
CHANGED
|
@@ -25,7 +25,7 @@ import { IViewer } from "./IViewer";
|
|
|
25
25
|
import { commands } from "./Commands";
|
|
26
26
|
import { EventEmitter2 } from "./EventEmitter2";
|
|
27
27
|
import { ViewerEventMap } from "./ViewerEvents";
|
|
28
|
-
import { OptionsEventMap
|
|
28
|
+
import { OptionsEventMap } from "./OptionsEvents";
|
|
29
29
|
import { CANVAS_EVENTS } from "./CanvasEvents";
|
|
30
30
|
|
|
31
31
|
import { OdBaseDragger } from "./Draggers/Common/OdBaseDragger";
|
|
@@ -76,7 +76,6 @@ export class Viewer extends EventEmitter2<ViewerEventMap & OptionsEventMap> impl
|
|
|
76
76
|
protected _visualizeJsUrl: string;
|
|
77
77
|
protected _abortControllerForReferences: AbortController | undefined;
|
|
78
78
|
|
|
79
|
-
private clientoptionschange: (event: OptionsChangeEvent) => void;
|
|
80
79
|
private canvaseventlistener: (event: Event) => void;
|
|
81
80
|
|
|
82
81
|
public draggerFactory: Map<string, typeof OdBaseDragger>;
|
|
@@ -117,7 +116,6 @@ export class Viewer extends EventEmitter2<ViewerEventMap & OptionsEventMap> impl
|
|
|
117
116
|
this._options = new Options(this);
|
|
118
117
|
|
|
119
118
|
this.client = client;
|
|
120
|
-
this.clientoptionschange = (event: OptionsChangeEvent) => (this._options.data = event.data.data);
|
|
121
119
|
|
|
122
120
|
this._activeDragger = null;
|
|
123
121
|
this._renderTime = 0;
|
|
@@ -154,11 +152,6 @@ export class Viewer extends EventEmitter2<ViewerEventMap & OptionsEventMap> impl
|
|
|
154
152
|
|
|
155
153
|
/**
|
|
156
154
|
* `VisualizeJS` parameters.
|
|
157
|
-
*
|
|
158
|
-
* Use this only for standalone viewer instances. Use {@link Client#options | Client.options}
|
|
159
|
-
* instead if the viewer was created with a `Client` reference using
|
|
160
|
-
* {@link Viewer | Viewer.create(client)}. Changes in client options will be automatically
|
|
161
|
-
* applied to the viewer options.
|
|
162
155
|
*/
|
|
163
156
|
get options(): Options {
|
|
164
157
|
return this._options;
|
|
@@ -207,10 +200,6 @@ export class Viewer extends EventEmitter2<ViewerEventMap & OptionsEventMap> impl
|
|
|
207
200
|
* of the `VisualizeJS` library. Retrieves {@link event:visualizeprogress | visualizeprogress} event.
|
|
208
201
|
*/
|
|
209
202
|
async initialize(canvas: HTMLCanvasElement, onProgress?: (event: ProgressEvent) => void): Promise<this> {
|
|
210
|
-
if (this.client) {
|
|
211
|
-
this.client.addEventListener("optionschange", this.clientoptionschange);
|
|
212
|
-
this.options.data = this.client.options.data;
|
|
213
|
-
}
|
|
214
203
|
this.addEventListener("optionschange", (event) => this.syncOptions(event.data));
|
|
215
204
|
|
|
216
205
|
if (canvas.style.width === "" && canvas.style.height === "") {
|
|
@@ -287,8 +276,6 @@ export class Viewer extends EventEmitter2<ViewerEventMap & OptionsEventMap> impl
|
|
|
287
276
|
this.visualizeJs?.getViewer().clear();
|
|
288
277
|
this.visualizeJs = undefined;
|
|
289
278
|
|
|
290
|
-
this.client?.removeEventListener("optionschange", this.clientoptionschange);
|
|
291
|
-
|
|
292
279
|
return this;
|
|
293
280
|
}
|
|
294
281
|
|