1
0
mirror of https://github.com/Artemis-RGB/Artemis synced 2025-12-13 05:48:35 +00:00
Robert 034879a2c9 Node editor - Implemented node visuals, pin visuals
Node editor - Implemented undo/redo and some commands
2022-03-13 22:07:16 +01:00

36 lines
812 B
C#

using System;
using Avalonia;
using Avalonia.Markup.Xaml;
using Avalonia.ReactiveUI;
namespace Artemis.UI.Screens.VisualScripting;
public class NodeView : ReactiveUserControl<NodeViewModel>
{
public NodeView()
{
InitializeComponent();
}
#region Overrides of Layoutable
/// <inheritdoc />
protected override Size MeasureOverride(Size availableSize)
{
// Take the base implementation's size
(double width, double height) = base.MeasureOverride(availableSize);
// Ceil the resulting size
width = Math.Ceiling(width / 10.0) * 10.0;
height = Math.Ceiling(height / 10.0) * 10.0;
return new Size(width, height);
}
#endregion
private void InitializeComponent()
{
AvaloniaXamlLoader.Load(this);
}
}