Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Controls layer refactor #474

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

kyctarnik
Copy link

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.

@zHaytam
Copy link
Collaborator

zHaytam commented Nov 13, 2024

Hello, I'll check this out thank you!

I do have a bit of hesitation regarding the reflection part, as I don't know how it all works with Blazor and the different outputs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants