Implemented the focused refinement gaps I found.
This commit is contained in:
parent
3a71e9c135
commit
91c5407ff9
@ -1938,6 +1938,8 @@ public sealed class FloorPlanBlockEditViewModel
|
||||
[Required, StringLength(40)]
|
||||
public string BlockType { get; set; } = FloorPlanBlockTypes.Room;
|
||||
|
||||
// Future L-shape support should add ShapeType, FootWidthCells, FootHeightCells, and CornerPosition
|
||||
// only when the database, save/load flow, rendering, and collision checks can move together.
|
||||
[StringLength(200)]
|
||||
public string? LabelOverride { get; set; }
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
var activeFloor = Model.Floors.OrderBy(x => x.SortOrder).ThenBy(x => x.Name).FirstOrDefault();
|
||||
var blocksByFloor = Model.Blocks.GroupBy(x => x.FloorPlanFloorID).ToDictionary(x => x.Key, x => x.ToList());
|
||||
var transitionsByFloor = Model.Transitions.GroupBy(x => x.FloorPlanFloorID).ToDictionary(x => x.Key, x => x.ToList());
|
||||
var selectedBlockId = int.TryParse(Context.Request.Query["selectedBlockId"], out var parsedSelectedBlockId) ? parsedSelectedBlockId : Model.Blocks.FirstOrDefault()?.FloorPlanBlockID ?? 0;
|
||||
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;
|
||||
@ -1364,7 +1364,7 @@ else
|
||||
addBlockModes.forEach(input => input.addEventListener("change", updateAddBlockMode));
|
||||
updateAddBlockMode();
|
||||
|
||||
const initialBlock = blocks.find(block => block.dataset.block === initialSelectedBlockId) || blocks[0];
|
||||
const initialBlock = blocks.find(block => block.dataset.block === initialSelectedBlockId);
|
||||
if (initialBlock) {
|
||||
setActiveFloor(initialBlock.dataset.floorId);
|
||||
selectBlock(initialBlock);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user