@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.
@@ -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, OptionsChangeEvent } from "./OptionsEvents";
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