gliff-ai / annotate

gliff.ai ANNOTATE – a user-friendly browser interface for annotating multidimensional images for machine learning development
https://gliff.ai
GNU Affero General Public License v3.0
2 stars 0 forks source link

fix: delete bezier #758

Closed philipjackson closed 2 years ago

philipjackson commented 2 years ago

Description

Three bug fixes:

  1. Fixed isTyping() so it's no longer constantly returns true (was breaking all keyboard shortcuts)
  2. When deleting the last annotation, a new annotation is automatically created. We automatically set the toolbox of this new annotation to be the same as the one that was deleted so it doesn't auto-change to paintbrush by default, but we needed to set spline.isBezier to false when the deleted spline was Bezier, otherwise spline store continues to say it is Bezier and the desync between annotation state and spline store breaks the toolbar logic (remember we can't access spline store in ui because it's a class component).
  3. Was rendering all Bezier splines as open or closed depending on the state of the active annotation, now they're rendered correctly.

Checklist:

Put an x in the boxes that apply to this pull request (you can also fill these out after opening the pull request). If you're unsure about any of these, don't hesitate to leave a comment on this pull request!

github-actions[bot] commented 2 years ago

Azure Static Web Apps: Your stage site is ready! Visit it here: https://black-wave-0f4ddd903-758.westeurope.azurestaticapps.net