Reply To: After zooming the canvas, it keeps redrawing every frame, causing severe lags.

NodeCanvas Forums Support After zooming the canvas, it keeps redrawing every frame, causing severe lags. Reply To: After zooming the canvas, it keeps redrawing every frame, causing severe lags.

#16898
lnkr
Participant

UPD:

– This does not occur after you tried to zoom in or out past the zoom limits.
– If you close the canvas while it is in a state of constant redrawing, it returns to this buggy state the next time the same dialogue tree is open.
FlowCanvas 3.26 ALSO AFFECTED

UPD2:

I pinned it down to UpdateSmoothPan in CanvasCore\Framework\Design\Editor\Windows\GraphEditor.cs

line 387: ( targetPan – pan ).magnitude < 0.1f never becomes true after zoom, causing continuous Repaint()

Still haven’t figured out what’s wrong with the math, but I was able to tame it, changing the value to ( targetPan – pan ).magnitude < 1.5f
But now I am somewhat concerned that is was basically the Repaint() loop that caused such significant issues, as it means that some symptoms can continue to occur simply by working with a canvas for the long enough time, but I have no idea where to look further.