组合对象完成

This commit is contained in:
艾竹
2023-02-03 22:25:03 +08:00
parent 2fde666182
commit bd90d55ca8
7 changed files with 88 additions and 48 deletions

View File

@@ -12,6 +12,8 @@ using System.Linq;
using System.Windows.Shapes;
using System.Windows.Resources;
using System.Runtime.InteropServices;
using Newtonsoft.Json;
using AIStudio.Wpf.DiagramDesigner.Models;
namespace AIStudio.Wpf.DiagramDesigner
{
@@ -567,8 +569,9 @@ namespace AIStudio.Wpf.DiagramDesigner
{
_viewModel.ClearSelectedItemsCommand.Execute(null);
Point position = e.GetPosition(this);
if (dragObject.DesignerItem is List<SelectableDesignerItemViewModelBase> designerItems)
if (dragObject.DesignerItem is SerializableObject serializableObject)
{
var designerItems = serializableObject.ToObject();
foreach (var item in designerItems.OfType<DesignerItemViewModelBase>())
{
item.Left += position.X;