|
@@ -12,9 +12,9 @@ namespace PixiEditor.Models.DataHolders
|
|
|
public Coordinates[] SelectedPoints { get; set; } = null;
|
|
|
public int VisualCanvasTop => SelectedPoints != null ? SelectedPoints.Min(x => x.Y) : -1;
|
|
|
public int VisualCanvasLeft => SelectedPoints != null ? SelectedPoints.Min(x => x.X) : -1;
|
|
|
- public int VisualWidth => SelectedPoints != null ? Math.Abs(SelectedPoints[0].X - SelectedPoints[^1].X) : 0;
|
|
|
+ public int VisualWidth => SelectedPoints != null ? Math.Abs(VisualCanvasLeft + 1 - (SelectedPoints.Max(x => x.X) + 1)) + 1 : 0;
|
|
|
|
|
|
- public int VisualHeight => SelectedPoints != null ? Math.Abs(SelectedPoints[0].Y - SelectedPoints[^1].Y) : 0;
|
|
|
+ public int VisualHeight => SelectedPoints != null ? Math.Abs(VisualCanvasTop + 1 - (SelectedPoints.Max(x => x.Y) + 1)) + 1 : 0;
|
|
|
public Visibility Visibility => SelectedPoints != null ? Visibility.Visible : Visibility.Collapsed;
|
|
|
|
|
|
public Selection()
|