Added the functionality to add RelayNode directly to edge between two Prot;

This commit is contained in:
Misaki
2024-11-07 00:42:52 +09:00
parent 02ae77f17a
commit 5ac1081d32
16 changed files with 243 additions and 150 deletions

View File

@@ -33,15 +33,15 @@ namespace Misaki.GraphView.Editor
Add(gridBackground);
gridBackground.SendToBack();
var minimapConfig = _graphViewConfig.miniMapConfig;
if (minimapConfig is { enable: true })
var miniMapConfig = _graphViewConfig.miniMapConfig;
if (miniMapConfig is { enable: true })
{
var minimap = new MiniMap()
var miniMap = new MiniMap()
{
anchored = true
};
minimap.SetPosition(minimapConfig.position);
Add(minimap);
miniMap.SetPosition(miniMapConfig.position);
Add(miniMap);
}
_blackboardView = new GraphBlackboardView(_graphObject, this, _graphViewConfig.serializedObject, _graphViewConfig.exposedPropertyTypeManager);
@@ -135,9 +135,9 @@ namespace Misaki.GraphView.Editor
private void OnDragPerform(DragPerformEvent evt)
{
var data = DragAndDrop.GetGenericData("DragSelection");
if (data is List<ISelectable> selectables)
if (data is List<ISelectable> selectable)
{
var propertyViews = selectables.OfType<BlackboardPropertyView>().ToArray();
var propertyViews = selectable.OfType<BlackboardPropertyView>().ToArray();
if (propertyViews.Length <= 0)
{
return;