Vonage/rxzu

Dynamic Node Width breaks Port Coords

florianeichin opened this issue · 1 comments

We set the dimension of our nodes dynamically. The HTML Element of the node is updating it's position correctly, but the coords of the ports doesn't. You can see this in the gif. in the blue circle, there are the html elements of the ports, that are moving, when the node grows. But the connections to the ports don't change. This is in the red circle.
ezgif-5-3315ef1163af

We update the width of the node like this:

    this.model.dimensionChanges().subscribe((dimension) => {
      if (this.containerNode != null) {
        this.renderer.setStyle(this.containerNode.nativeElement, 'width', `${dimension.width}px`);
        this.renderer.setStyle(this.containerNode.nativeElement, 'height', `${dimension.height}px`);
      }
    });

I further inspected and I see, that the ports are correctly moving, when moving around the node, but not when setting the size

#96 should resolve this.