Ignore:
Timestamp:
Jun 4, 2010, 6:05:07 AM (11 years ago)
Author:
matkovic
Message:

-Zoom implemented
-PluginContainerView delete function added
-Several Style changes
-added images

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/CrypPlugins/WorkspaceManager/View/Container/WorkSpaceEditorView.xaml.cs

    r1570 r1583  
    127127        void shape_OnConnectorMouseLeftButtonDown(object sender, ConnectorViewEventArgs e)
    128128        {
    129             if (selectedConnector != null)
     129            if (selectedConnector != null && e.connector.cModel.ConnectorType.Name == selectedConnector.cModel.ConnectorType.Name)
    130130            {
    131131                this.root.Children.Remove(dummyLine);
     
    158158            {
    159159                p = selectedPluginContainer.GetPosition();
    160                 this.selectedPluginContainer.SetPosition(new Point(p.X + (Mouse.GetPosition(sender as WorkSpaceEditorView).X - previousDragPoint.X), p.Y + (Mouse.GetPosition(sender as WorkSpaceEditorView).Y - previousDragPoint.Y)));
     160                this.selectedPluginContainer.SetPosition(new Point(p.X + Mouse.GetPosition(root).X - previousDragPoint.X, p.Y + Mouse.GetPosition(root).Y - previousDragPoint.Y));
    161161            }
    162162
    163163            if (selectedConnector != null && root.Children.Contains(dummyLine))
    164164            {
    165                 this.dummyLine.EndPoint = Mouse.GetPosition(sender as WorkSpaceEditorView);
    166             }
    167             this.previousDragPoint = Mouse.GetPosition(sender as WorkSpaceEditorView);
     165                this.dummyLine.EndPoint = Mouse.GetPosition(root);
     166            }
     167            this.previousDragPoint = Mouse.GetPosition(root);
    168168        }
    169169
     
    192192            DragDropDataObject obj = e.Data.GetData("Cryptool.PluginBase.Editor.DragDropDataObject") as DragDropDataObject;
    193193            if(obj != null)
    194                 this.AddPluginContainerView(e.GetPosition(this), WorkspaceModel.newPluginModel(DragDropDataObjectToPluginConverter.CreatePluginInstance(obj.AssemblyFullName, obj.TypeFullName)));
     194                this.AddPluginContainerView(e.GetPosition(root), WorkspaceModel.newPluginModel(DragDropDataObjectToPluginConverter.CreatePluginInstance(obj.AssemblyFullName, obj.TypeFullName)));
    195195        }
    196196
Note: See TracChangeset for help on using the changeset viewer.