Hi!
Had issue with round rectangles in my custom shape not being rendered after calling roundrect.
After looking up sources, I noticed that at the beginning of roundrect function there is check if (!this.node) return; before calling rect().
roundrect(x: number, y: number, w: number, h: number, dx: number, dy: number) {
if (!this.node) return;
this.rect(x, y, w, h);
...
So I'm wondering why it's here. Calling begin before roundrect seems to fix issue, because begin() initialize node variable, but rect() will initialize it anyway.
Hi!
Had issue with round rectangles in my custom shape not being rendered after calling
roundrect.After looking up sources, I noticed that at the beginning of
roundrectfunction there is checkif (!this.node) return;before callingrect().So I'm wondering why it's here. Calling
beginbeforeroundrectseems to fix issue, becausebegin()initializenodevariable, butrect()will initialize it anyway.