Closed serberm closed 1 year ago
Does the parent element of Rete's container have fixed sizes? Probably at the initialization of the editor, the parent element has zero sizes
Yep, you are right, it had zero sizes. I was initializing container in ngAfterViewInit and found out that not all style properties are attached after ngAfterViewInit event. So the fix was to set timeout
setTimeout(() => { const container = this.el.nativeElement; let editor = new NodeEditor("rivetNodeEditor@0.1.0", container); ... }, 10);
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 10 days.
I'm using Angular 7.1.4. If I use editor inside components it renders ok, but if pass editor as child to another components with ng-content it does not render Nodes inside editor until window is resized. As a workaround I tried to trigger window resize in ngOnInit:
and it renders nodes but do not render connection lines between sockets