public void OnLeftButtonDragReleased(object sender, MouseManagerEventArgs e) { var nodesToBeCommitted = new List<ViewModel.Node>(); foreach (var nodeControl in Selector.NodeControls) { var transactionalMouseManagerEventArgs = new TransactionalMouseManagerEventArgs(); transactionalMouseManagerEventArgs.InnerMouseManagerEventArgs = e; transactionalMouseManagerEventArgs.IsTransactional = true; transactionalMouseManagerEventArgs.NodesToBeCommitted = nodesToBeCommitted; nodeControl.MotionHandler.NodeMotionHandler.OnLeftButtonDragReleased(sender, transactionalMouseManagerEventArgs); } /// TODO: The following needs to be removed. This should not be in here. /// The reason this is bad is because a UI level component is making commands direct into the controller rather than raising it through events. /// The issue here is that due to the current architecture, this MupltipleNodeMotionHandler, although it belongs to only one node, it actually performs /// operations for EVERY node on the graph. This is very poor encapsulation. IoC.GetInstance<Controller.ISuperGraphNodeBatchOperations>().CommitLocations(nodesToBeCommitted); }