You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The reason in (dist/xeokit-sdk.es.js Line: 15060....):
´this._isCustom = false;seems to be always false. When_destroy()` is called internally,
Line 15190...
_destroy() {
if (this._element && (!this._isCustom)) {
// ^^^^^^ custom was used but here never set to something positive. Its always false
// remove element: in this case also our custom spinner:
this._element.parentNode.removeChild(this._element);
this._element = null;
}
...
eg. when re-init the viewer like viewer.destroy(); it drops our custom dom element
e.g: <div id="myspinner"...
The next creation of a viewer can not find myspinner in the dom anymore
and creates an internal spinner we can not control (in position or layout).
To Reproduce
viewer = new Viewer({
canvasElement: viewerCanvas,
transparent: true
spinnerElementId: "myspinner"
}),
// ... load model/s an show
if (viewer) {
viewer.destroy();
}
// create a new viewer
viewer = new Viewer({
canvasElement: viewerCanvas,
transparent: true
spinnerElementId: "myspinner"
}),
ERROR:
[Spinner '__1']: Can't find given Spinner HTML element: 'myspinner' - will automatically create default element
Desktop (please complete the following information):
OS: Current *nix or Win Systems
Browser: Any current browser
Kind regards
The text was updated successfully, but these errors were encountered:
Describe the bug
While using the viewer, we use a custom spinner.
But this dom element can get lost/destroyed.
The reason in (dist/xeokit-sdk.es.js Line: 15060....):
´this._isCustom = false;
seems to be always false. When
_destroy()` is called internally,eg. when re-init the viewer like
viewer.destroy();
it drops our custom dom elemente.g:
<div id="myspinner"...
The next creation of a viewer can not find
myspinner
in the dom anymoreand creates an internal spinner we can not control (in position or layout).
To Reproduce
Desktop (please complete the following information):
Kind regards
The text was updated successfully, but these errors were encountered: