Hi,
Your code works, but there’s an easier way to move the currently selected nodes in a direction of your choice:
if (view.Selection.NodesCount < 1)
return;
float step = document.Settings.NudgeLeft / view.SceneScaleToDeviceX;
view.Selection.BatchTranslate.Translate(CompassDirection.West, step, false, false);
view.SmartRefresh();
This moves all currently selected shapes the distance specified by the NudgeLeft document setting. If you want to move the shapes exactly a fixed number of pixels you can use the following code:
if (view.Selection.NodesCount < 1)
return;
view.Selection.BatchTranslate.Translate(-10, 0, false, false);
view.SmartRefresh();
Best Regards,
Nevron Support Team