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

Message created from Message.FromPoint now has Transform.Origin #982

Merged
merged 3 commits into from
May 31, 2023

Conversation

DmytroMuravskyi
Copy link
Contributor

@DmytroMuravskyi DmytroMuravskyi commented May 19, 2023

… set exactly on original point.

BACKGROUND:

  • While working on the function I needed to find line end that is closest to warning box. I found that Transfrom.Origin for Message object, originated from Point are not set to this point but rather to the center of box bottom side.

DESCRIPTION:

  • Instead of lowering transform - representation is lowered.

TESTING:

  • Added a MessageFromPointHasCorrectTransform test.

FUTURE WORK:

  • Inside Message.FromCurve and Message.FromPolygon tranform is set without meaning. This also can be changed, so Message.FromCurve Transform.Origin is set to start point and Message.FromPolygon - to centroid, for example.

REQUIRED:

  • All changes are up to date in CHANGELOG.md.

This change is Reviewable

@wynged wynged self-requested a review May 25, 2023 14:25
[Fact]
public void MessageFromPointHasCorrectTransform()
{
var line = new Line((2.1, 4.2, 2), (3.3, 5, 3));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a reason to use a line here rather than just a point?

Copy link
Contributor Author

@DmytroMuravskyi DmytroMuravskyi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 0 of 1 approvals obtained (waiting on @wynged)


Elements/test/MessageTests.cs line 13 at r1 (raw file):

Previously, wynged (Eric Wassail) wrote…

is there a reason to use a line here rather than just a point?

No, I created test based on issue I had, changed to point since line feels unnecessary.

Copy link
Member

@wynged wynged left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 3 of 3 files at r2, all commit messages.
Reviewable status: :shipit: complete! 1 of 1 approvals obtained

@wynged wynged merged commit 705f85f into hypar-io:master May 31, 2023
2 checks passed
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.

None yet

2 participants