File tree 3 files changed +10
-5
lines changed
3 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -262,9 +262,10 @@ export class NgtCanvas implements OnInit, OnChanges {
262
262
this . zone . runOutsideAngular ( ( ) => {
263
263
if ( ! this . configurator ) this . configurator = this . initRoot ( this . glCanvas . nativeElement ) ;
264
264
this . configurator . configure ( { ...inputs ( ) , size : result } ) ;
265
+ this . configurator . startInvalidate ( ) ;
265
266
266
267
if ( this . glRef ) {
267
- this . cdr . detectChanges ( ) ;
268
+ safeDetectChanges ( this . cdr ) ;
268
269
} else {
269
270
this . render ( ) ;
270
271
}
@@ -346,7 +347,7 @@ export class NgtCanvas implements OnInit, OnChanges {
346
347
for ( const [ key , value ] of Object . entries ( this . sceneGraphInputs ) ) {
347
348
this . glRef . setInput ( key , value ) ;
348
349
}
349
- this . glRef . changeDetectorRef . detectChanges ( ) ;
350
+ safeDetectChanges ( this . glRef . changeDetectorRef ) ;
350
351
}
351
352
} ) ;
352
353
}
Original file line number Diff line number Diff line change @@ -236,7 +236,7 @@ export class NgtRendererStore {
236
236
return ;
237
237
}
238
238
239
- const parent = getLocalState ( node ) . parent ( ) || rS [ NgtRendererClassId . parent ] ;
239
+ const parent = untracked ( getLocalState ( node ) . parent ) || rS [ NgtRendererClassId . parent ] ;
240
240
241
241
// [rawValue]
242
242
if ( getLocalState ( node ) . isRaw && name === SPECIAL_PROPERTIES . VALUE ) {
Original file line number Diff line number Diff line change @@ -261,9 +261,13 @@ export function injectCanvasRootInitializer(injector?: Injector) {
261
261
if ( state . frameloop !== frameloop ) state . setFrameloop ( frameloop ) ;
262
262
263
263
isConfigured = true ;
264
-
264
+ } ,
265
+ startInvalidate : ( ) => {
265
266
invalidateRef ?. destroy ( ) ;
266
- invalidateRef = effect ( ( ) => void store . state ( ) . invalidate ( ) , { manualCleanup : true , injector } ) ;
267
+ return ( invalidateRef = effect ( ( ) => void store . state ( ) . invalidate ( ) , {
268
+ manualCleanup : true ,
269
+ injector,
270
+ } ) ) ;
267
271
} ,
268
272
} ;
269
273
} ;
You can’t perform that action at this time.
0 commit comments