Skip to content

Commit

Permalink
Drop some unused code and values (ForNeVeR#100)
Browse files Browse the repository at this point in the history
  • Loading branch information
ForNeVeR committed Aug 11, 2019
1 parent b511180 commit 10639a5
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 14 deletions.
6 changes: 3 additions & 3 deletions src/WpfMath.Tests/TestResults/BoxTests.casesBox.approved.txt
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
"Source": null,
"Foreground": null,
"Background": null,
"Tag": "Row:0",
"Tag": null,
"TotalHeight": 0.78055500000000011,
"TotalWidth": 0.87859,
"Italic": 0.0,
Expand Down Expand Up @@ -269,7 +269,7 @@
"Source": null,
"Foreground": null,
"Background": null,
"Tag": "Row:1",
"Tag": null,
"TotalHeight": 1.044445,
"TotalWidth": 0.87859,
"Italic": 0.0,
Expand Down Expand Up @@ -386,7 +386,7 @@
"Source": null,
"Foreground": null,
"Background": null,
"Tag": "Row:2",
"Tag": null,
"TotalHeight": 0.78055500000000011,
"TotalWidth": 0.87859,
"Italic": 0.0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@
"Source": null,
"Foreground": null,
"Background": null,
"Tag": "Row:0",
"Tag": null,
"TotalHeight": 0.99444400000000011,
"TotalWidth": 2.9000059999999994,
"Italic": 0.0,
Expand Down Expand Up @@ -565,7 +565,7 @@
"Source": null,
"Foreground": null,
"Background": null,
"Tag": "Row:0",
"Tag": null,
"TotalHeight": 0.99444400000000011,
"TotalWidth": 0.85000199999999992,
"Italic": 0.0,
Expand Down Expand Up @@ -682,7 +682,7 @@
"Source": null,
"Foreground": null,
"Background": null,
"Tag": "Row:1",
"Tag": null,
"TotalHeight": 0.99444400000000011,
"TotalWidth": 0.85000199999999992,
"Italic": 0.0,
Expand Down Expand Up @@ -856,7 +856,7 @@
"Source": null,
"Foreground": null,
"Background": null,
"Tag": "Row:1",
"Tag": null,
"TotalHeight": 2.338888,
"TotalWidth": 2.9000059999999994,
"Italic": 0.0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@
"Source": null,
"Foreground": null,
"Background": null,
"Tag": "Row:0",
"Tag": null,
"TotalHeight": 0.99444400000000011,
"TotalWidth": 1.7000039999999998,
"Italic": 0.0,
Expand Down Expand Up @@ -473,7 +473,7 @@
"Source": null,
"Foreground": null,
"Background": null,
"Tag": "Row:1",
"Tag": null,
"TotalHeight": 0.99444400000000011,
"TotalWidth": 1.7000039999999998,
"Italic": 0.0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@
"Source": null,
"Foreground": null,
"Background": null,
"Tag": "Row:0",
"Tag": null,
"TotalHeight": 1.0166680000000001,
"TotalWidth": 7.0991643999999994,
"Italic": 0.0,
Expand Down Expand Up @@ -1269,7 +1269,7 @@
"Source": null,
"Foreground": null,
"Background": null,
"Tag": "Row:1",
"Tag": null,
"TotalHeight": 1.4640028,
"TotalWidth": 7.0991643999999994,
"Italic": 0.0,
Expand Down
5 changes: 2 additions & 3 deletions src/WpfMath/Atoms/MatrixAtom.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,9 @@ protected override Box CreateBoxCore(TexEnvironment environment)
rowsContainer.Add(row);
}

rowsContainer.Depth = rowsContainer.Height / 2;
ApplyCellSizes(rowBoxes, matrixCellGaps);

var adjustedWidth = rowBoxes.Max(r => r.Width);
var adjustedWidth = rowBoxes.Max(r => r.TotalWidth);
var adjustedHeight = rowHeights.Sum();

rowsContainer.Depth = adjustedHeight / 2;
Expand All @@ -79,7 +78,7 @@ private HorizontalBox CreateRowBox(
// TODO[F]: remove rowIndex parameter altogether with Tags
// TODO[F]: remove rowHeights and colunmWidths arguments (calculate them outside)
// TODO[F]: return IEnumerable<Box> from here and make the outside code to control the paddings
var rowBox = new HorizontalBox {Tag = $"Row:{rowIndex}",};
var rowBox = new HorizontalBox();

for (int j = 0; j < maxColumnCount; j++)
{
Expand Down

0 comments on commit 10639a5

Please sign in to comment.