port from perforce
This commit is contained in:
28
intromat/Intromat/Nodes/DxNodeBase.cs
Normal file
28
intromat/Intromat/Nodes/DxNodeBase.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Reactive;
|
||||
using System.Reactive.Linq;
|
||||
using DynamicData;
|
||||
using Intromat.ViewModels;
|
||||
using NodeNetwork.Toolkit.ValueNode;
|
||||
using NodeNetwork.ViewModels;
|
||||
|
||||
namespace Intromat.Nodes
|
||||
{
|
||||
public abstract class DxNodeBase : CodeGenNodeViewModel
|
||||
{
|
||||
protected DxNodeBase()
|
||||
: base(NodeType.Literal)
|
||||
{
|
||||
AnyInputChanged = Inputs
|
||||
.Connect()
|
||||
.Filter(input => input is ValueNodeInputViewModelBase)
|
||||
.WhenValueChanged(input => ((ValueNodeInputViewModelBase)input).UnitValueChanged)
|
||||
.SelectMany(i => i!);
|
||||
|
||||
AnyInputChanged.Subscribe(_ => { });
|
||||
Resizable = ResizeOrientation.HorizontalAndVertical;
|
||||
}
|
||||
|
||||
public IObservable<Unit> AnyInputChanged { get; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user