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

Run secondary workflow: improved the string conversion to ensure rounding while drawing bounding box #884

Merged
merged 6 commits into from
Jun 18, 2024

Conversation

MatTolladay
Copy link
Collaborator

This doesn't guarantee that the individual members of the BoundingBox will display correctly when accessed.

@MatTolladay MatTolladay requested a review from hvangeffen May 29, 2024 13:01
@MatTolladay MatTolladay self-assigned this May 29, 2024
@MatTolladay MatTolladay linked an issue May 29, 2024 that may be closed by this pull request
@MatTolladay MatTolladay force-pushed the 868-bounding-box-accuracy branch from 36ebb4e to a6551ca Compare May 29, 2024 13:35
@MatTolladay MatTolladay force-pushed the 868-bounding-box-accuracy branch from a6551ca to 9bf8c5d Compare May 29, 2024 14:25
Comment on lines 26 to 27
const { boundingBox, boundingBoxString } = useBoundingBox(1, 1)

Copy link
Collaborator

Choose a reason for hiding this comment

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

This creates a new bounding box state object, disconnecting the
image
bbox state and the
image
bbox state.

The import used before was accessing global state.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I have reverted the changes. I don't understand how the old import accessed global state, but I would like to know. I think I understand how the const { boundingBox, boundingBoxString } = useBoundingBox(1, 1) creates a new box (the _boundingBox instantiated in the useBoundingBox function. Is that correct?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Not global state through import sorry,

Definemodel (a compiler macro for prop / emit definition) was accepting the bbox through a prop:
https://vuejs.org/guide/components/v-model.html

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ahh, the boundingBox is being provided by the parent component as a v-model, using the workflowsStore.boundingBox. This does not provide reactivity to the lon/lat values in BoundingBoxControl when selecting a box.

src/services/useBoundingBox/index.ts Outdated Show resolved Hide resolved
src/services/useBoundingBox/index.ts Outdated Show resolved Hide resolved
@hvangeffen
Copy link
Collaborator

For the form itself maybe we can round the number after selecting a box with the draw tool:
image

@hvangeffen hvangeffen requested a review from wkramer June 10, 2024 13:12
@hvangeffen hvangeffen requested review from ceesvoesenek and removed request for wkramer June 11, 2024 10:03
src/lib/utils/math.ts Outdated Show resolved Hide resolved
@ceesvoesenek ceesvoesenek merged commit ee8eef7 into main Jun 18, 2024
8 checks passed
@ceesvoesenek ceesvoesenek deleted the 868-bounding-box-accuracy branch June 18, 2024 08:39
@bogaardt bogaardt changed the title BoundingBox: improved the string conversion to ensure rounding Run secondary workflow: improved the string conversion to ensure rounding while drawing bounding box Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bounding box accuracy
5 participants