// programmatic position changes internal void onStartPlacementChange(ChartObject item) { if (!undoEnabled) return; currProgrModifyCmd = new ModifyItemCmd(item); }
// modifications might be compositted, e.g. dragging a box would // probably modify the arrows attached to it internal void onModifyItem(ChartObject item) { if (!undoEnabled) return; // during layout operations all items already have a ModifyItemCmd created if (currLayoutCmd != null) return; // might be called for group children while in BoundginRect.set if (currProgrModifyCmd != null) { currProgrModifyCmd.AddSubCmd(new ModifyItemCmd(item)); } else // or when users start moving an item around if (currModifyCmd == null) { currModifyCmd = new ModifyItemCmd(item); } else // or when dependent items positions are updated while // moving another item around { currModifyCmd.AddSubCmd(new ModifyItemCmd(item)); } }