Skip to content

Commit 6e4fb71

Browse files
committed
BringIntoView: Remove unnecessary calculation
1 parent ac8aec7 commit 6e4fb71

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Nodify/NodifyEditor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -757,7 +757,7 @@ public void ZoomAtPosition(double zoom, Point location)
757757
/// <remarks>Temporarily disables editor controls when animated.</remarks>
758758
public void BringIntoView(Point point, bool animated = true, Action? onFinish = null)
759759
{
760-
Point newLocation = (Point)((((Vector)point - (Vector)ViewportSize / 2) * ViewportZoom) / ViewportZoom);
760+
Point newLocation = (Point)((Vector)point - (Vector)ViewportSize / 2);
761761

762762
if (animated && newLocation != ViewportLocation)
763763
{

0 commit comments

Comments
 (0)