-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Fix opacity reset #7186
Fix opacity reset #7186
Conversation
Changelog? |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## develop #7186 +/- ##
===========================================
- Coverage 81.48% 81.44% -0.05%
===========================================
Files 364 365 +1
Lines 39877 39886 +9
Branches 3702 3700 -2
===========================================
- Hits 32494 32484 -10
- Misses 7383 7402 +19
|
cvat-ui/src/utils/clamp-opacity.ts
Outdated
const withMasks = states | ||
.some((_state: ObjectState): boolean => _state.shapeType === ShapeType.MASK); | ||
const opacity = withMasks || job?.dimension === DimensionType.DIMENSION_3D ? | ||
Math.max(shapes.opacity, ENHANCED_DEFAULT_OPACITY) : shapes.opacity; | ||
const selectedOpacity = withMasks || job?.dimension === DimensionType.DIMENSION_3D ? | ||
Math.max(shapes.selectedOpacity, ENHANCED_DEFAULT_SELECTED_OPACITY) : shapes.selectedOpacity; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As an optimization, I would suggest first to check if current opacity/selected opacity already more or equal than enhanced level, just skip the algorithm. Also checking job?.dimension is quicker, so, it is a thing we should probably do first
I am still facing the issue raised in the link: #7176 |
Today (July 22, 2024), I found out that the Opacity Resetting issue has been resolved. Thanks a lot to the CVAT team. |
Motivation and context
Resolved #7176
Opacity keeps resetting after changing frame (even without the masks)
How has this been tested?
Checklist
develop
branch[ ] I have updated the documentation accordingly(cvat-canvas,
cvat-core,
cvat-data and
cvat-ui)
License
Feel free to contact the maintainers if that's a concern.