dymaptic / GeoBlazor

Core Components for the Dymaptic GeoBlazor Library
MIT License
109 stars 19 forks source link

HorizontalAlignment and VerticalAlignment doesn't start with lower case #295

Closed dirk193 closed 9 months ago

dirk193 commented 9 months ago

In namespace dymaptic.GeoBlazor.Core.Components.Symbols;

public enum HorizontalAlignment {

pragma warning disable CS1591 // Missing XML comment for publicly visible type or member

left,
right,
center

pragma warning restore CS1591 // Missing XML comment for publicly visible type or member

}

public enum VerticalAlignment {

pragma warning disable CS1591 // Missing XML comment for publicly visible type or member

baseline,
top,
middle,
bottom

pragma warning restore CS1591 // Missing XML comment for publicly visible type or member

}

Make at example Left to left, because otherwise it will not work

Further in function internal override SymbolSerializationRecord ToSerializationRecord()

not exist XOffset and YOffset

TimPurdum commented 9 months ago

@dirk193 thank you for this. I can see this is specifically impacting the Protobuf serialization of graphics, using SymbolSerializationRecord. The JSON serializations should all be working correctly due to the [JsonConverter(typeof(EnumToKebabCaseStringConverter<HorizontalAlignment>))] attribute, which automatically lower-cases all the enums.

I will work on a fix for this, however, it will be specific to the serialization, as we don't want to move away from the C# idiomatic style of upper-casing enum members.