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(react-components): Add tool and domain obect for making Image360Annotation #4864

Merged
merged 24 commits into from
Nov 15, 2024

Conversation

nilscognite
Copy link
Contributor

@nilscognite nilscognite commented Nov 14, 2024

Type of change

Feat

Jira ticket 📘

Description 📝

  • Added tool, domain object and creator for making points inside a 360 image.
  • This reuse LineDomainObject
  • Fix error in Hover. New using a pointerEvent
  • On LineDomainObject , make it possible to override a transformer that transform the points.
  • This is because Image360Annotation stores the points as vectors from center of the image. So to get correct coordinates everywhere getTransformedPoint and getCopyOfTransformedPoint was made. The default implementation works as before.

Also:

  • Remove Points and Polyline classes. Not in use
  • Fixed some minor errors in length calculations for closed polygon in LineDomainObject
  • Added some new property to the calling code easer: pointCount, lineSegmentCount, isClosed, firstPoint and lastPoint. Use them in order to make the code easier to read and reuse.

How has this been tested? 🔍

The new features need to be tested by go inside a 360 image and use the polygon tool in storybook.

  • Goto storybook/architecture
  • Go into a 360 image
  • The 4th icon in the toolbar (polygon) will appear.
  • Make it active
  • Add some points
  • You can add several polygons
  • Try to select one and delete it
  • Go out, when the visualization will be hidden.
  • Go in again. the visualization will be there.

Test instructions ℹ️

Checklist ☑️

  • I am proud of this feature.
  • I have performed a self-review of my own code.
  • I have added PR type (Feat, Bug, Chore, Test, Docs, Style, Refactor) to the PR title.
  • I have manually tested this for different scenarios (different models, formats, devices, browsers).
  • I have commented my code in hard-to-understand areas.
  • I have made corresponding changes to the public documentation.
  • I have added unit and visuals tests to prove that my feature works to the best of my ability.
  • I have refactored the code for readability to the best of my ability.
  • I have checked that my changes do not introduce regressions in the public documentation.
  • I have outlined any known defects / lacking capabilities in the contents of this PR.
  • I have listed any remaining work that should follow this PR in the description or jira/miro/etc.
  • I have added TSDoc to any public facing changes.
  • I have added "developer documentation" in any package README.md that is related / applicable to this PR.
  • I have noted down and am currently tracking any technical debt introduced in this PR.
  • I have thoroughly thought about the architecture of this implementation.
  • I have asked peers to test this feature.

@nilscognite nilscognite marked this pull request as ready for review November 14, 2024 14:23
Copy link
Contributor

@haakonflatval-cognite haakonflatval-cognite left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@nilscognite nilscognite enabled auto-merge (squash) November 15, 2024 12:15
@nilscognite nilscognite merged commit 12035d6 into master Nov 15, 2024
14 checks passed
@nilscognite nilscognite deleted the np/anders branch November 15, 2024 12:18
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.

3 participants