Blazor.Diagrams icon indicating copy to clipboard operation
Blazor.Diagrams copied to clipboard

Controls layer refactor

Open kyctarnik opened this issue 4 months ago • 0 comments

Refactor for ControlsLayer.

Now you can use multiple controls type for same model (OnHover AND/OR OnSelection AND/OR AlwaysOn). I also added the "AlwaysOn" type, since I have already seen similar requests here. Well, I also needed a similar type for controls.

I used reflection (foreach (ControlsType type in (ControlsType[])Enum.GetValues(typeof(ControlsType)))) in some places for future refactor. if suddenly an additional type of controls is needed, which is not currently noticed, or if it is generally decided to use custom controls types. I dont think, if it will slow down performance a lot. If its not acceptable - i`ll rewrite it using 3 different lists.

Such a pull request is necessary to implement business requirements regarding the display of information on a node at the time of editing and the ability to use additional. buttons when selecting a node. However, the previous implementation limited our capabilities. I'm guessing that someone has already had a similar problem.

p.s. failed tests "DiagramCanvasTests" is not my fault. It was broken in "development" branch.

kyctarnik avatar Sep 29 '24 20:09 kyctarnik