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

feat(editors/SingleLineDiagram) Allow movement of bays #478

Closed
wants to merge 1 commit into from

Conversation

danyill
Copy link
Collaborator

@danyill danyill commented Jan 12, 2022

Allow movement of bays, see #456

I will be very happy to take a review and make corrections. I will be happy to be educated. Perhaps I could convince @dlabordus to take a look (hi! 😉).

Note that I have used SVGGraphicsElement instead of SVGElement because many methods associated with graphical objects are not available in the TS types for SVGElement (see MDN). I have resisted the urge to replace this more widely than required to satisfy the compiler.

It seemed for the time being that the best way to access bay properties was on the bay text rather than the rectangle drawn for the bay as this overlaps other objects. This is not consistent with what is done elsewhere where we click on the graphic. Happy to take some ideas about a better approach.

The ssd file included on the issue might be helpful for tests.

moving_bays.mp4

I'm not sure how to write a test but I'm happy to have a go.

Note: This works on "some bays" for me but not all of them, the getBBox appears not to always be correct -- I haven't yet looked into this.

@danyill
Copy link
Collaborator Author

danyill commented Jan 12, 2022

There is also an "annoying flicker" during re-render after a change in coordinates that I need to look into.

@danyill danyill marked this pull request as draft January 12, 2022 18:53
@danyill
Copy link
Collaborator Author

danyill commented Jan 22, 2022

Looks to be obsolete, see later #504

@danyill danyill closed this Jan 22, 2022
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.

1 participant