diff --git a/PlotLine/Views/FloorPlans/Edit.cshtml b/PlotLine/Views/FloorPlans/Edit.cshtml index 39e0d6c..5b32a48 100644 --- a/PlotLine/Views/FloorPlans/Edit.cshtml +++ b/PlotLine/Views/FloorPlans/Edit.cshtml @@ -8,37 +8,6 @@ var selectedBlockId = int.TryParse(Context.Request.Query["selectedBlockId"], out var parsedSelectedBlockId) ? parsedSelectedBlockId : 0; string BlockClass(string blockType) => $"floor-plan-block floor-plan-block--{blockType.ToLowerInvariant()}"; string CssNumber(decimal value) => value.ToString("0.###", System.Globalization.CultureInfo.InvariantCulture); - bool RangesOverlap(int aStart, int aLength, int bStart, int bLength) => aStart < bStart + bLength && bStart < aStart + aLength; - string SharedWallClasses(FloorPlanBlockEditViewModel block, IReadOnlyList floorBlocks) - { - var classes = new List(); - foreach (var other in floorBlocks) - { - if (other.FloorPlanBlockID == block.FloorPlanBlockID || other.LocationID != block.LocationID) - { - continue; - } - - if (block.X + block.WidthCells == other.X && RangesOverlap(block.Y, block.HeightCells, other.Y, other.HeightCells)) - { - classes.Add("merge-east"); - } - if (other.X + other.WidthCells == block.X && RangesOverlap(block.Y, block.HeightCells, other.Y, other.HeightCells)) - { - classes.Add("merge-west"); - } - if (block.Y + block.HeightCells == other.Y && RangesOverlap(block.X, block.WidthCells, other.X, other.WidthCells)) - { - classes.Add("merge-south"); - } - if (other.Y + other.HeightCells == block.Y && RangesOverlap(block.X, block.WidthCells, other.X, other.WidthCells)) - { - classes.Add("merge-north"); - } - } - - return string.Join(" ", classes.Distinct()); - } string TransitionDetails(FloorPlanTransitionEditViewModel transition) { var details = $"{transition.FromLocationName} -> {transition.ToLocationName}\n{transition.TransitionType}"; @@ -186,7 +155,7 @@ { var blockIndex = Model.Blocks.FindIndex(x => x.FloorPlanBlockID == block.FloorPlanBlockID);