@@ -106,11 +106,9 @@ export class StorybookScene {
106106
107107 constructor ( ) {
108108 afterNextRender ( ( ) => {
109- untracked ( ( ) => {
110- this . ref = this . anchor ( ) . createComponent ( this . story ) ;
111- this . setStoryOptions ( this . storyOptions ( ) ) ;
112- this . ref . changeDetectorRef . detectChanges ( ) ;
113- } ) ;
109+ this . ref = this . anchor ( ) . createComponent ( this . story ) ;
110+ this . setStoryOptions ( this . storyOptions ( ) ) ;
111+ this . ref . changeDetectorRef . detectChanges ( ) ;
114112 } ) ;
115113
116114 effect ( ( ) => {
@@ -168,25 +166,23 @@ export class StorybookSetup {
168166 let refEnvInjector : EnvironmentInjector ;
169167
170168 afterNextRender ( ( ) => {
171- untracked ( ( ) => {
172- refEnvInjector = createEnvironmentInjector (
173- [
174- { provide : CANVAS_OPTIONS , useValue : this . canvasOptions ( ) } ,
175- { provide : STORY_COMPONENT , useValue : this . story ( ) } ,
176- { provide : STORY_COMPONENT_MIRROR , useValue : reflectComponentType ( this . story ( ) ) } ,
177- { provide : STORY_OPTIONS , useValue : this . storyOptions } ,
178- ] ,
179- envInjector ,
180- ) ;
181-
182- ref = this . anchor ( ) . createComponent ( NgtCanvas , { environmentInjector : refEnvInjector } ) ;
183- ref . setInput ( 'shadows' , true ) ;
184- ref . setInput ( 'performance' , this . canvasOptions ( ) . performance ) ;
185- ref . setInput ( 'camera' , this . canvasOptions ( ) . camera ) ;
186- ref . setInput ( 'sceneGraph' , StorybookScene ) ;
187- ref . setInput ( 'orthographic' , this . canvasOptions ( ) . orthographic ) ;
188- ref . changeDetectorRef . detectChanges ( ) ;
189- } ) ;
169+ refEnvInjector = createEnvironmentInjector (
170+ [
171+ { provide : CANVAS_OPTIONS , useValue : this . canvasOptions ( ) } ,
172+ { provide : STORY_COMPONENT , useValue : this . story ( ) } ,
173+ { provide : STORY_COMPONENT_MIRROR , useValue : reflectComponentType ( this . story ( ) ) } ,
174+ { provide : STORY_OPTIONS , useValue : this . storyOptions } ,
175+ ] ,
176+ envInjector ,
177+ ) ;
178+
179+ ref = this . anchor ( ) . createComponent ( NgtCanvas , { environmentInjector : refEnvInjector } ) ;
180+ ref . setInput ( 'shadows' , true ) ;
181+ ref . setInput ( 'performance' , this . canvasOptions ( ) . performance ) ;
182+ ref . setInput ( 'camera' , this . canvasOptions ( ) . camera ) ;
183+ ref . setInput ( 'sceneGraph' , StorybookScene ) ;
184+ ref . setInput ( 'orthographic' , this . canvasOptions ( ) . orthographic ) ;
185+ ref . changeDetectorRef . detectChanges ( ) ;
190186 } ) ;
191187
192188 inject ( DestroyRef ) . onDestroy ( ( ) => {
0 commit comments