Skip to content

Commit 1c38809

Browse files
committed
Test files plus some fixes
1 parent d9a116a commit 1c38809

File tree

9 files changed

+168
-136
lines changed

9 files changed

+168
-136
lines changed

examples/tests/render-settings.ts

Lines changed: 156 additions & 124 deletions
Large diffs are not rendered by default.

src/main-api/Inspector.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,7 @@ export class Inspector {
343343
this.destroyNode(node.id);
344344
originalDestroy.call(node);
345345
},
346+
configurable: true,
346347
});
347348

348349
const originalAnimate = node.animate;
@@ -363,6 +364,7 @@ export class Inspector {
363364

364365
return animationController;
365366
},
367+
configurable: true,
366368
});
367369

368370
return node;

src/main-api/Renderer.ts

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -751,18 +751,16 @@ export class RendererMain extends EventEmitter {
751751
this.stage as { options: Readonly<Required<RendererMainSettings>> }
752752
).options = updatedSettings;
753753

754-
if (options.inspector !== undefined) {
755-
if (!isProductionEnvironment()) {
756-
if (options.inspector === false) {
757-
this.inspector?.destroy();
758-
this.inspector = null;
759-
} else if (
760-
this.inspector === null ||
761-
this.inspector.constructor !== options.inspector
762-
) {
763-
this.inspector = new options.inspector(this.canvas, this.settings);
764-
this.inspector?.createNodes(this.root as unknown as CoreNode);
765-
}
754+
if (options.inspector !== undefined && !isProductionEnvironment()) {
755+
if (options.inspector === false) {
756+
this.inspector?.destroy();
757+
this.inspector = null;
758+
} else if (
759+
this.inspector === null ||
760+
this.inspector.constructor !== options.inspector
761+
) {
762+
this.inspector = new options.inspector(this.canvas, this.settings);
763+
this.inspector?.createNodes(this.root as unknown as CoreNode);
766764
}
767765
}
768766

49.7 KB
Loading
54 KB
Loading
80.6 KB
Loading
77.8 KB
Loading
74.1 KB
Loading
69.3 KB
Loading

0 commit comments

Comments
 (0)