Closed ilomon10 closed 4 months ago
Please make a demo.
@lavrton i use state to change it not change, even direct change to groupRef it cannot modify the clipping area.
You don't need to reset the clip function. You can put some logs in it to see if it is called correctly.
The issue is in combination with Transformer. Transformer doesn't change the width and height of the rectangle. Instead, it is changing scaleX
and scaleY
, so it see the effect you may need to do this:
ctx.rect(0, 0, rect.width() * rect.scaleX(), rect.height() * rect.scaleY());
thank you @lavrton it solved now
i have this kind of component to clip the children based on rectRef:
the rectRef does not update in the clipFunc after get hot change, it just update one time on initial render