Skip to content

Commit

Permalink
Update model X and Y on CenterViewOnElement
Browse files Browse the repository at this point in the history
  • Loading branch information
scottmitchell committed Sep 1, 2019
1 parent 52f9bc6 commit 2607752
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/DynamoCoreWpf/Views/Core/WorkspaceView.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -837,12 +837,11 @@ internal void CenterViewOnElement(object sender, EventArgs e)

double deltaX = nodeCenterInOverlay.X - outerCenter.X;
double deltaY = nodeCenterInOverlay.Y - outerCenter.Y;

vm.Model.X -= deltaX;
vm.Model.Y -= deltaY;

//var offset = new Point(vm.CurrentOffset.X - deltaX, vm.CurrentOffset.Y - deltaY);

//vm.CurrentOffset = offset;

zoomBorder.SetTranslateTransformOrigin(new Point2D(vm.Model.X - deltaX, vm.Model.Y - deltaY));
zoomBorder.SetTranslateTransformOrigin(new Point2D(vm.Model.X, vm.Model.Y));
}
});
}
Expand Down

0 comments on commit 2607752

Please sign in to comment.