konva
konva copied to clipboard
Transformer Maximum Call Stack Exceeded
I am getting this error when I mouse up after transforming elements. Any idea why I am getting this range error?
Demo?
That is a full app. I am not interested to debug it. Instead, just make a minimal demo with jsbin or codesandbox or something similar. With only code required to reproduce the bug. Nothing else.
I think I can help. and I guess you want to draw some rects on a image, and select one rect for resizing. @bhamlefty
There is a demo from konvajs website. https://konvajs.org/docs/select_and_transform/Basic_demo.html. in this demo, this line of code is important to prevent Maximum Call Stack Exceeded.
when click on the transformer to resize a rect, we click on one of the rect of a transformer, and then drag.
In my situation, without the line of code in the picture, transformer.nodes contains a rect which is a child of the transformer. and Maximum Call Stack Exceeded came out.
I add the line of code, it works well. I hope this will help you.
it is interesting to find out the reason of this problem. and I do not think it is a bug of konva. when click and resize a rect, do it carefaully.